Hi Gary,
Although the shared buffer indeed has a queue-like interface there's a
catch for my needs. I need that pull method to retrieve the item in the
head and to move the head forward, and not to remove the item from the
buffer. Just like zc.queue I need a single copy of a item in the queue,
but I also need this uniqueness over the time, so that any item which
has being consumed already, does not get back to buffer.
Thanks for your advice, I haven't seen zc.queue, so you comments are
really an improvement to my knowledge. Besides I'm going to take a peek
at zc.queue and compare it with my own implementation.
Thanks and best regards,
Manuel.
Gary Poster wrote:
On Feb 11, 2007, at 7:29 PM, Manuel Vazquez Acosta wrote:
My scenario is akin a consumer-producer with shared buffer. Consumers
pull items from the buffer whilst producers put items in the buffer.
The buffer is an OOBTree along with an IOBTree which gives "serial"
numbers to the keys of the OOBTree.
I'm not sure if this is a match, but if you follow Chris' suggestions
(which I recommend generally) then you might want to look at zc.queue:
http://cheeseshop.python.org/pypi/zc.queue/ .
Gary
_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list - [email protected]
http://mail.zope.org/mailman/listinfo/zodb-dev