[Twisted-Python] Re: Can a deferred catch a segmentation fault?
Gerald John M. Manipon
Geraldjohn.M.Manipon at jpl.nasa.gov
Thu Sep 20 15:30:09 EDT 2007
Thanks for the responses.
Ed, AsynQueue is exactly what I'm looking for! Is it possible
for me to test it out?
Gerald John M. Manipon wrote:
> I'm using deferToThread to run some python code which may or may not
> be safe. In particular, the code may load some modules that could
> seg fault. In this case, deferToThread won't work and the python
> process will bomb so I was wondering what Defer strategy I could
> use to handle this situation:
> from twisted.internet import threads, reactor
> def segFaultFunc():
> import binning #this will seg fault
> return True
> def myCb(res):
> print "Got", res
> d = threads.deferToThread(segFaultFunc)
> Any help on this is greatly appreciated.
More information about the Twisted-Python