Queuing mechanism that is poll/select'able ?

Donn Cave donn at oz.net
Sat Dec 30 02:42:05 EST 2000


Quoth Chris Ebenezer <chriseb at pobox.com>:
| I'm re-writing some python code to use active objects (i.e multiple
| threads).  I have been looking at using the Queue class as a means to
| send messages between different objects.  
|
| However, the one problem is that since the Queue class isn't based
| around a unix abstraction that is descriptor based, it doesn't support
| select().  Since this is the only mechanism that is relatively
| ubiquitous in unix for the use of polling, this causes problems when
| you try to use Queue's in-conjunction with other 'eventing objects'
| like sockets etc.
|
| I'm pondering writing a Queue-like class based around UNIX domain
| sockets (pipes would be even better but would have built in
| limitations) and cPickle, but before i do this i thought i would ask
| around to see if such a beast already exists.
|
| So, does such a mechanism exist ?

I have had to do a similar kind of thing, though in the context
of BeOS native thread & message handling vs. sockets.  I don't
have an existing implementation that works with Queue, but I hope
you will find that existence of such parallel implementations
supports the concept.  In other words, good idea, go for it!

	Donn Cave, donn at oz.net



More information about the Python-list mailing list