[rabbitmq-discuss] Pika and multi-threading

Denis Conan Denis.Conan at telecom-sudparis.eu
Mon Mar 14 14:49:55 GMT 2011


Le 14/03/2011 15:18, Gavin M. Roy a écrit :
>
> On Mar 14, 2011, at 10:09 AM, Denis Conan<Denis.Conan at telecom-sudparis.eu>  wrote:
>
>> Le 22/02/2011 17:02, Gavin M. Roy a écrit :
>>> 2011/2/22 Denis Conan<Denis.Conan at telecom-sudparis.eu>:
>>>>
>>>> Hi all,
>>>>
>>>> The Pika Web site says: "Pika does not have any notion of threading in the
>>>> code. If you want to use Pika with threading, make sure you have a Pika
>>>> connection per thread, created in that thread. It is not safe to share one
>>>> Pika connection across threads."
>>>>
>>>> When using the continuation-passing style mode with SelectConnection, what
>>>> about the singleton object IOLoop? I created a connection on the main thread
>>>> for a vhost, and then a second connection for a different vhost in a new
>>>> thread, but callbacks of the main threads for the first vhost are called. Am
>>>> I missing something?
>>>
>>> You're not, this is something I'm working through now. In essence,
>>> there is a logical separation in the pika code between the core of how
>>> pika does what it does and the connection adapters. The singleton
>>> model for ioloops was a later addition that broke the model with
>>> regard to threads. I have been working on fixing this to be thread
>>> safe and will have something out soon on it.
>>>
>>
>> Hi all,
>>
>> has this issue been solved?
>
> Yes it is addressed in the soon to be released 0.9.5 which is waiting on documentation updates and full regression testing on Rabbit 2.0 and higher. I am planning on tagging and pushing this release to pypi this week.

That's ok
thank you very much in advance

>>
>
> Gavin

denis


More information about the rabbitmq-discuss mailing list