Antoine Pitrou <solip...@pitrou.net> writes:

> I've submitted a patch (*) to add an optional timeout to locking
> operations (Lock.acquire() etc.). Since it's a pretty basic
> functionality, I would like to know if there was any good reason for
> not doing it.

I always assumed it was because as a least-common-denominator set of
functionality, some platforms didn't have the necessary support.

Providing the discussion on this ends up with the an implementation
being accepted, I'd absolutely love to see this then leveraged by
threading.Condition.wait() rather rather than the current
poll-with-timed-sleep approach.

The overhead (CPU, but most notably latency) of that approach (which
also directly impacts Queues) has historically been my top reason in
various applications on Windows to have to implement my own Queue or
Condition structures using native Windows calls.

-- David

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to