No exception propagation from within @pycsp.greenlets.io-decorated functions.
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
Reproduce:
>>> import pycsp.greenlets as pycsp
>>> import time
>>> @pycsp.io
... def blocking():
... time.sleep(1)
... raise Exception('OMG!')
...
>>> @pycsp.process
... def show():
... try:
... blocking()
... except Exception as ex:
... print 'Exception caught: %s' % str(ex)
... else:
... print 'No exception!'
...
>>> pycsp.Parallel(show())
Expected output:
Exception caught: OMG!
Actual output:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.6/dist-packages/pycsp/greenlets/scheduling.py", line 97, in run
self.retval = self.fn(*self.args, **self.kwargs)
File "<stdin>", line 4, in blocking
Exception: OMG!
Original issue reported on code.google.com by dirk...@gmail.com
on 15 Jun 2010 at 11:09
Google Code Exporter commented
Set Rune as owner -- I probably won't find the time before deadline on Aug 11.
Original comment by dirk...@gmail.com
on 15 Jun 2010 at 12:29
- Added labels: greenlets
Google Code Exporter commented
[deleted comment]
Google Code Exporter commented
Should be verified that the behaviour is wanted.
Original comment by runedren...@gmail.com
on 25 Jun 2010 at 2:38
- Changed state: Fixed
- Removed labels: greenlets