Guido van Rossum wrote:
> Apart from trying to guess the API without reading the docs (:-), what
> are the use cases for using put/get with a timeout? I have a feeling
> it's not that common.
Actually, I think wanting to use a timeout is an artifact of a history of
dealing with too many C libraries which don't provide a proper event-based or
select-style interface (which means the calls have to time out periodically in
order to respond gracefully to program shutdown requests).
However, because Queues are multi-producer, that isn't a problem - I just have
to remember to push the shutdown request in through the Queue.
Basically, I'd fallen into the "trying-to-write-C-in-Python" trap and I simply
didn't notice until I read the responses in this thread :)
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://boredomandlaziness.blogspot.com
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com