> You could possibly make a case that before Queue.put blocks it should check
> whether the program has more than just the one thread and if not it should
> raise an RTFMException.
Cute :-)
--
http://mail.python.org/mailman/listinfo/python-list
brad wrote:
> Marc 'BlackJack' Rintsch wrote:
>
>> Why did you put an upper bound to the queue?
>
> For clarity. Explicit is better than implicit, right? In our design, the
> queue should only have x number of things, so why not show that? Other
> than that, the limit is arbitrary and is not ne
brad <[EMAIL PROTECTED]> wrote:
> Chris Mellon wrote:
>
>> ... 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.
>
> I assumed that the behavior would have been the other way around. I
> should not
brad 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 hangin
Marc 'BlackJack' Rintsch wrote:
> Why did you put an upper bound to the queue?
For clarity. Explicit is better than implicit, right? In our design, the
queue should only have x number of things, so why not show that? Other
than that, the limit is arbitrary and is not needed.
--
http://mail.pyt
Chris Mellon wrote:
> ... 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.
I assumed that the behavior would have been the other way around. I
should not have made that assumption.
--
http://mail.pyt
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 d
On Aug 8, 9:38 am, brad <[EMAIL PROTECTED]> wrote:
> 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 appropri
On Wed, 08 Aug 2007 09:38:49 -0400, brad 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 tr
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
thi
10 matches
Mail list logo