On Apr 29, 5:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> Terry <[EMAIL PROTECTED]> wrote:
> > On Apr 28, 5:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> > > David <[EMAIL PROTECTED]> wrote:
> > > > Another idea would be to have multiple queues, one per thread or per
> > > > message
On Apr 29, 4:32 pm, [EMAIL PROTECTED] wrote:
> On 27 Apr, 12:27, Terry <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello!
>
> > I'm trying to implement a message queue among threads using Queue. The
> > message queue has two operations:
> > PutMsg(id, msg) # this is simple, just combine the id and msg as
On Apr 29, 3:01 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Sun, 27 Apr 2008 03:27:59 -0700 (PDT), Terry <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > I'm trying to implement a message queue among threads using Queue. The
> > message queue has two operations:
>
Terry <[EMAIL PROTECTED]> wrote:
> On Apr 28, 5:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> > David <[EMAIL PROTECTED]> wrote:
> > > Another idea would be to have multiple queues, one per thread or per
> > > message type "group". The producer thread pushes into the appropriate
> > > que
On 27 Apr, 12:27, Terry <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm trying to implement a message queue among threads using Queue. The
> message queue has two operations:
> PutMsg(id, msg) # this is simple, just combine the id and msg as one
> and put it into the Queue.
> WaitMsg(ids, msg) # this
On Apr 28, 10:48 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I've never used it myself but you may find candygram
> interesting;http://candygram.sourceforge.net, which AFAIK implements
> Erlang-style
> message queues in Python.
Thank you. I will look at candygram and stackless. I believ
On Apr 28, 5:30 pm, Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
> David <[EMAIL PROTECTED]> wrote:
> > Another idea would be to have multiple queues, one per thread or per
> > message type "group". The producer thread pushes into the appropriate
> > queues (through an intelligent PutMsg function)
I've never used it myself but you may find candygram interesting;
http://candygram.sourceforge.net, which AFAIK implements Erlang-style
message queues in Python.
--
http://mail.python.org/mailman/listinfo/python-list
David <[EMAIL PROTECTED]> wrote:
> Another idea would be to have multiple queues, one per thread or per
> message type "group". The producer thread pushes into the appropriate
> queues (through an intelligent PutMsg function), and the consumer
> threads pull from the queues they're interested i
(re-cc-ing the list)
On Sun, Apr 27, 2008 at 4:40 PM, Terry Yin <[EMAIL PROTECTED]> wrote:
> Defaultdict is not an option because there will be a lot of message IDs (and
> increasing). I will implement LookAheadQueue class by overriding the Queue
> class.
>
> Thanks for your kind advice.
>
> BTW,
> WaitMsg will get only msg with certain ids, but this is not possible
> in Queue object, because Queue provides no method to peek into the
> message queue and fetch only matched item.
>
> Now I'm using an ugly solution, fetch all the messages and put the not
> used ones back to the queue. But
On Apr 27, 6:27 pm, Terry <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm trying to implement a message queue among threads using Queue. The
> message queue has two operations:
> PutMsg(id, msg) # this is simple, just combine the id and msg as one
> and put it into the Queue.
> WaitMsg(ids, msg) # thi
Hello!
I'm trying to implement a message queue among threads using Queue. The
message queue has two operations:
PutMsg(id, msg) # this is simple, just combine the id and msg as one
and put it into the Queue.
WaitMsg(ids, msg) # this is the hard part
WaitMsg will get only msg with certain ids, bu
13 matches
Mail list logo