A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/futurecore/python-csp below:

futurecore/python-csp: python-csp provides python with communicating sequential processes style parallelism

python-csp: Communicating Sequential Processes for Python

Copyright (C) Sarah Mount, 2009 under the GNU GPL v2. See the file LICENSE for more details.

python-csp can be installed using PIP (PIP Installs Python):

$ sudo pip install python-csp

or from a source distribution using setup.py:

$ sudo python setup.py install

python-csp adds C.A.R. (Tony) Hoare's Communicating Sequential Processes to Python. A brief example:

>>> @process
... def writer(channel, n):
...      for i in xrange(n):
...              channel.write(i)
...      channel.poison()
...      return
... 
>>> @process
... def reader(channel):
...      while True:
...              print channel.read()
... 
>>> chan = Channel()
>>> Par(reader(chan), writer(chan, 5)).start()
0
1
2
3
4
>>>

There are several sources of documentation for python-csp:

S. Mount, M. Hammoudeh, S. Wilson, R. Newman (2009) CSP as a Domain-Specific Language Embedded in Python and Jython. In Proceedings of Communicating Process Architectures 2009. Eindoven, Netherlands. 1st -- 4th November 2009. Published IOS Press.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4