[Twisted-Python] deferToThread question
michele.petrazzo at unipex.it
Fri Aug 20 05:07:20 EDT 2004
I want to call a block function. I use deferToThread to call it, so
something like this:
os.popen3(my_soft) #my_soft is a blocking software
print 1/0 # Simulate an error
If I use normal (not defer) call, so: block_func(), the exception is
raised after my_soft is closed.
I i call block_func with defer, so:
t = threads.deferToThread(block_func)
the error is raised before my_soft is closed.
Why? Is it right?
S.O. win2k and mdk10, both with py 2.3.4, twisted 1.3.0, wxpy 2.4.2 and
user of wxsupport, not wxreactor.
More information about the Twisted-Python