[rabbitmq-discuss] AMQP & Python Write-Up

Barry Pederson bp at barryp.org
Wed Jan 14 21:16:04 GMT 2009


Ben Hood wrote:
 > Jason,
 >
 > On Wed, Jan 14, 2009 at 7:18 PM, Jason J. W. Williams
 > <jasonjwwilliams at gmail.com> wrote:
 >> I called py-amqplib non-threadsafe because the docs say not to share
 >> channels between threads. So I suppose it would be more accurate to
 >> say, the library is threadsafe if you do not share channel objects
 >> between threads.
 >
 > IIRC Barry's first incarnation was threadless and hence threadsafe.
 >
 > Subsequently the library is undergoing a facelift:
 > http://hg.barryp.org/py-amqplib-devel

All the above is true.  My take would be:  py-amqplib is safe to use in 
a threaded program, as long connections (and by extension their 
channels) aren't shared between threads.

py-amqplib does not rely on threading, although the development version 
in the URL above has an optional mode that does use a thread to allow 
some additional capabilities.

I believe that running in the new optional thread-using mode, it could 
still be used in a threaded program subject to the same restrictions as 
the non-thread-using mode.

	Barry





More information about the rabbitmq-discuss mailing list