[Twisted-Python] Synchronous Code Fishbowl

Matt Goodall matt at pollenation.net
Fri Jun 2 05:20:07 MDT 2006


Philip Jenvey wrote:
> On May 31, 2006, at 7:10 AM, Matt Goodall wrote:
> 
>> After that, I think the queue implementation is ok.
>>
>>
>> And some people insist that threading is easy ;-).
>>
> 
> Alternatively you could take advantage of python's built in thread- safe
> Queue.Queue. Simply extend it and overwrite the private methods  (_put,
> _get, etc.)


Good idea.


The usual comment about not overriding _ method applies but it looks
safe in this case because Queue explicitly documents the _ methods that
are safe to override.


- Matt


-- 
     __
    /  \__     Matt Goodall, Pollenation Internet Ltd
    \__/  \    w: http://www.pollenation.net
  __/  \__/    e: matt at pollenation.net
 /  \__/  \    t: +44 (0)113 2252500
 \__/  \__/
 /  \          Any views expressed are my own and do not necessarily
 \__/          reflect the views of my employer.




More information about the Twisted-Python mailing list