Re: deque and thread-safety

2012-10-12 Thread Dieter Maurer
Christophe Vandeplas writes: > ... > From the documentation I understand that deques are thread-safe: >> Deques are a generalization of stacks and queues (the name is pronounced >> “deck” >> and is short for “double-ended queue”). Deques support thread-safe, memory >> efficient appends and pops

Re: deque and thread-safety

2012-10-12 Thread Antoine Pitrou
Hello, Christophe Vandeplas vandeplas.com> writes: > > From the documentation I understand that deques are thread-safe: > > Deques are a generalization of stacks and queues (the name is pronounced “deck” > > and is short for “double-ended queue”). Deques support thread-safe, memory > > efficie

Re: deque and thread-safety

2012-10-12 Thread Christophe Vandeplas
Ok sorry for the mail, I found the solution by using deque.count(url) that's available starting from python 2.7 On Fri, Oct 12, 2012 at 2:40 PM, Christophe Vandeplas wrote: > Hello, > > I have a question about deque and thread-safety. > > My application has multiple threads

deque and thread-safety

2012-10-12 Thread Christophe Vandeplas
Hello, I have a question about deque and thread-safety. My application has multiple threads running concurrently and doing the same action (downloading pages) To know what has already been downloaded I created the variable: seen = deque('', 1000) (keeps list of max 1000 urls in m