[zeromq-dev] Fwd: Re: New Python bindings
sustrik at 250bpm.com
Mon Feb 15 09:59:07 CET 2010
>> Is this is safe? After calling send, the msg is passed to an IO thread ?
>> That means there are now two threads concerned with the lifetime of memory
>> of the string (python and the zmq io thread?)
> You raise a good point. I had forgot that the msg is not sent immediately.
This is the reason why most bindings make copy of the message on send.
It proves to be almost impossible to get a piece of memory from the
language runtime (gc) and deallocate is later on in asynchronous manner
(the deallocation function is called from a worker thread).
More information about the zeromq-dev