On 8/8/07, brad <[EMAIL PROTECTED]> wrote: > url_queue = Queue.Queue(256) > for subnet in subnets: > url_queue.put(subnet) > > The problem is that I have 512 things to add to the queue, but my limit > is half that... whoops. Shouldn't the interpreter tell me that I'm an > idiot for trying to do this instead of just hanging? A message such as > this would be more appropriate: > > "Hey fool, you told me to only accept 256 things and you're trying to > give me 512... what's up with that?"
You should have read the Queue documentation first. Queues, by design, are producer/consumer streams and the producer is designed to block if the queue is full. You can use the put_nowait method to have it raise an exception instead of blocking. -- http://mail.python.org/mailman/listinfo/python-list