Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

Re: cpython: Make AcquirerProxy.acquire() support timeout argument

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


solipsis at pitrou

May 6, 2012, 9:07 AM

Post #1 of 3 (173 views)
Permalink
Re: cpython: Make AcquirerProxy.acquire() support timeout argument

On Sun, 06 May 2012 17:56:55 +0200
richard.oudkerk <python-checkins [at] python> wrote:
> http://hg.python.org/cpython/rev/b4a1d9287780
> changeset: 76800:b4a1d9287780
> user: Richard Oudkerk <shibturn [at] gmail>
> date: Sun May 06 16:45:02 2012 +0100
> summary:
> Make AcquirerProxy.acquire() support timeout argument

Should it have a Misc/NEWS entry? (and a doc addition perhaps?)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


shibturn at gmail

May 6, 2012, 10:58 AM

Post #2 of 3 (161 views)
Permalink
Re: cpython: Make AcquirerProxy.acquire() support timeout argument [In reply to]

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.

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?

As currently implemented AcquirerProxy.acquire() treats negative
timeouts as infinite.

Cheers

Richard

_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com


solipsis at pitrou

May 6, 2012, 12:48 PM

Post #3 of 3 (164 views)
Permalink
Re: cpython: Make AcquirerProxy.acquire() support timeout argument [In reply to]

On Sun, 06 May 2012 18:58:10 +0100
shibturn <shibturn [at] gmail> 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.


_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.