[zeromq-dev] pyzmq use ioloop the threading version work and the multiprocessing can't work

KIU Shueng Chuan nixchuan at gmail.com
Mon Nov 18 12:22:14 CET 2013


In threading module, the __init__() method is executed by the parent
thread. Only the run() method executes in the newly spawned thread.

So you should create the context in the run() method.

Since multiprocessing module follows the threading module interface, I
suppose the same thing applies.
On Nov 18, 2013 12:22 PM, "Mo Jia" <life.130815 at gmail.com> wrote:

> Hi all,
>
>      I ask a question in stackoverflow about using pyzmq to write a sample
> server.
>  When a change threading to multiprocessing , it can't work any more.
>
>     the mulitprocessing got error on ZMQError: Interrupted system call. while
> the thread version work fine. You can see i create context in the process
> 's init func .
>
>     Here is the link .
> http://stackoverflow.com/questions/20031530/zmq-zmqerror-interrupted-system-call-on-multiprocessing-while-the-threading-i
>  .
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131118/1ba9f9f4/attachment.html>


More information about the zeromq-dev mailing list