I will say importing your reactor (from twisted.internet import reactor) must be done inside the sub-process or you won't get what you want. -J On Mon, Apr 12, 2010 at 9:39 AM, Jason J. W. Williams <jasonjwwilliams@gmail.com> wrote:
Haven't had any issues yet. Twisted imports occur inside the process function. The app was originally written as a purely blocking multiprocessing app and rewritten to use Twisted inside the sub-processes. It's passed all automated and hand tests without an issue. Is there a reason importing Twisted inside sub-process should not work?
-J
On Mon, Apr 12, 2010 at 8:45 AM, David Ripton <dripton@ripton.net> wrote:
On 2010.04.12 16:23:54 +0200, Gabriel Rossetti wrote:
Jason J. W. Williams wrote:
You might want to try Python's multiprocessing code, it works very well. I've had pretty good luck using it with Twisted inside the processes too. The multiprocessing library handles the work of setting up the send and receive file descriptors.
yes, I was going to use that but I read in several threads that this didn't work correctly in Twisted
IMO Jason probably has a lurking bug that he just hasn't noticed so far.
Same thing with using subprocess instead of the Twisted equivalent inside a Twisted reactor. IMX it works 99% of the time. Murphy's Law says it'll pass cursory testing and then fail in production.
-- David Ripton dripton@ripton.net
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python