[Twisted-Python] Using reactor with multiple processes

Dimitri Vorona alendit at googlemail.com
Wed Sep 16 09:27:16 EDT 2009


i'd like to be able to start additional instances of my server using
multiprocess module. To do it i just start a new Process with
mutiprocessing and then create a new instance of my Application there.
Everything works fine, but i can't figure out a way to
stop such a process. If I run reactor.stop() in the child process I
get an infinite loop of errors looking like this:

   --- <exception caught here> ---
 File "/usr/share/exe/twisted/internet/tcp.py", line 755, in doRead
   skt, addr = self.socket.accept()
 File "/usr/lib/python2.6/socket.py", line 195, in accept
   sock, addr = self._sock.accept()
<class 'socket.error'>: [Errno 22] Invalid argument

 I couldn't not find much information on using reactor from different
processes, so i'm asking for help here.


More information about the Twisted-Python mailing list