----------
* Added a raised Exception('Deadlock') when all processes are blocked on
channel communication. Only pycsp.greenlets has this deadlock detection.
* Added a wrapper for Alternation to simplify usage. It consists of
the following constructs AltSelect, InputGuard, OutputGuard,
SkipGuard and TimeoutGuard:
AltSelect examples:
AltSelect(
InputGuard(register, action=add_service()),
InputGuard(inc, action=dispatch())
)
AltSelect(
OutputGuard(left, msg=True, action="right(True)"),
OutputGuard(right, msg=True, action="left(True)")
)
ch, msg = AltSelect(
InputGuard(workerIn),
OutputGuard(workerOut, jobs[-1]),
SkipGuard()
)
* Added buffered channels to all versions.
Usage: A = Channel(buffer=<N>) where <N> is the wanted buffer size.
The Channel is implemented in buffer.py as a process maintaining a list of
buffered elements.
* Fixed (threads) bug in Alternation, where a poison or retire could overwrite a committed match.
* Fixed a poor design choice. The naming __channel_input can have unwanted side-effects
in Python, thus __channel_input is renamed to channel_input. Sorry for the inconvenience.
* Removed the Channel.status method.
* Fixed bug in propagation of poison / retire.
* Fixed Python 2.4 support for threads implementation.
* Added pycsp.common package that contains plugNplay processes and other general process
templates.
Usage:
from pycsp.threads import *
from pycsp.common import plugNplay
Parallel(plugNplay.Prefix(cin, cout, prefix=1))
* Added current_process_id() function for debugging purposes. It returns the unique id of the
pycsp process executing current_process_id().
* Changed matching of channels in function parameter lists, when propagating retire and poison.
* Changed Alternation.execute to also return (guard, msg) just as Alternation.select.