snim2
unread,Oct 17, 2010, 4:55:11 PM10/17/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to python-csp
Hi everyone,
just a couple of updates... I've been massively busy with the new
Semester, but I'm hoping to pick up the pace of things in the next few
weeks, and move towards the merger with PyCSP. Thanks for the bug
reports and so on that people have left on the list, I'll be going
through them systematically over the next fortnight or so.
In the mean time, during #flossuk I managed to hack up a quick version
of the context manager that Russel suggested, which gives a sort of
pseudo-OCCAM syntax to python-csp. It can be found in csp/csp.py and
tests/test_contexts.py although, as ever, it needs proper unit
testing. I haven't added docs to the Tutorial yet, but this is how it
is intended to be used:
from csp.csp import CSP
p = CSP()
with p.SEQ: # Execute the following functions in sequence
p.process(myfunction1, arg1, arg2)
with p.PAR: # Execute the following functions in parallel
p.process(myfunction2, arg1, arg2)
p.process(myfunction3, arg1, arg2)
p.process(myfunction4, arg1, arg2) # Back to serial...
p.start() # Start all that running now...
All the best,
Sarah