On Thu, 2003-11-13 at 11:39, Philippe Lafoucrière wrote:
where do I put my blocking code ? just before the defer.succeed ??
I'm sure this has been answered a million times before, but here goes... Deferreds do not magically turn blocking code into non-blocking code. If you place blocking code in a wmfactory_ method, it will still interfere with the event loop. If you have blocking code, you can either rewrite it in a non-blocking manner, or you can use a separate thread to run it. <http://twistedmatrix.com/documents/howto/threading> If you give more detail about what you're trying to do, I'm sure one of the Twisted gurus can explain what the best approach(es) might be. -- Alex Levy WWW: http://mesozoic.geecs.org "Never let your sense of morals prevent you from doing what is right." -- Salvor Hardin, Isaac Asimov's _Foundation_