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

Mo Jia life.130815 at gmail.com
Tue Nov 19 12:47:39 CET 2013


thank  you .
The code work fine after move create context to run .




2013/11/18 KIU Shueng Chuan <nixchuan at gmail.com>

> 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
>>
>>
> _______________________________________________
> 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/20131119/3517d946/attachment.html>


More information about the zeromq-dev mailing list