[Python-Dev] cpython: Make AcquirerProxy.acquire() support timeout argument

Antoine Pitrou solipsis at pitrou.net
Sun May 6 21:48:01 CEST 2012


On Sun, 06 May 2012 18:58:10 +0100
shibturn <shibturn at gmail.com> wrote:
> On 06/05/2012 5:07pm, Antoine Pitrou wrote:
> > On Sun, 06 May 2012 17:56:55 +0200
> >> summary:
> >>    Make AcquirerProxy.acquire() support timeout argument
> >
> > Should it have a Misc/NEWS entry? (and a doc addition perhaps?)
> 
> Since proxies for locks/semaphores are supposed to work the same way as 
> the proxied object from threading, one could argue that the lack of 
> support in 3.2 was a bug.

Ok; if it's a bug it should have a NEWS entry, though.

> I notice now that multiprocessing.*.acquire() and threading.*.wait() 
> treat negative timeouts as zero timeouts.  On the other hand, 
> threading.*.acquire() treat negative timeouts as infinite.
> 
> Maybe these inconsistencies should be documented or eliminated?

I don't know. Ideally both would have raised ValueError on negative
timeouts, but it's probably too late :-)

cheers

Antoine.




More information about the Python-Dev mailing list