Queue peek?

2010-03-02 Thread Veloz
Hi all I'm looking for a queue that I can use with multiprocessing, which has a peek method. I've seen some discussion about queue.peek but don't see anything in the docs about it. Does python have a queue class with peek semantics? Michael -- http://mail.python.org/mailman/listinfo/python-list

Re: Queue peek?

2010-03-02 Thread Veloz
On Mar 2, 1:18 pm, Raymond Hettinger wrote: > On Mar 2, 8:29 am, Veloz wrote: > > > Hi all > > I'm looking for a queue that I can use with multiprocessing, which has > > a peek method. > > > I've seen some discussion about queue.peek but don't s

Re: Queue peek?

2010-03-03 Thread Veloz
On Mar 3, 1:14 am, Gregory Ewing wrote: > MRAB wrote: > > I suppose it depends on the complexity of the data structure. A dict's > > methods are threadsafe, for example, but if you have a data structure > > where access leads to multiple method calls then collectively they need > > a lock. > > It

When to lock data items returned by multiprocessing.Manager?

2010-03-03 Thread Veloz
So I'm using a multiprocessing.Manager instance in my main app and asking it to create a dictionary, which I am providing to instances of the application that I'm forking off with Process. The Processes and main app will be reading/writing to the dictionary. It's not clear to me what I have to "l