[issue7316] Add a timeout functionality to common locking operations

2010-04-14 Thread Torsten Landschoff
Torsten Landschoff added the comment: While you are at it, you might want to submit the patch from http://bugs.python.org/issue850728 as well. It adds timeouts for semaphores. :) -- ___ Python tracker ___

[issue7316] Add a timeout functionality to common locking operations

2010-04-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you! Checked in in r80071. -- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue7316] Add a timeout functionality to common locking operations

2010-04-13 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Thanks, looks good. Sorry for the delay. -- resolution: -> accepted ___ Python tracker ___ ___ Pyt

[issue7316] Add a timeout functionality to common locking operations

2010-04-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch against current py3k. About the timeout limit, an useful point of comparison is select(), which doesn't try to loop either: it just throws OverflowError if the specified timeout value is too large to be represented in a timeval struct. -

[issue7316] Add a timeout functionality to common locking operations

2010-03-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15795/timedlock4.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7316] Add a timeout functionality to common locking operations

2010-03-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a new patch fixing most of your comments. A couple of answers: > I believe we can support arbitrary values here, subject to floating > point rounding errors, by calling lock-with-timeout in a loop. I'm not > sure whether that's a good idea, but it fits

[issue7316] Add a timeout functionality to common locking operations

2010-02-01 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7316] Add a timeout functionality to common locking operations

2010-01-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15533/timedlock3.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7316] Add a timeout functionality to common locking operations

2010-01-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15352/timedlock2.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7316] Add a timeout functionality to common locking operations

2010-01-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15321/timedlock.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7316] Add a timeout functionality to common locking operations

2010-01-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch against newest py3k. -- Added file: http://bugs.python.org/file15795/timedlock4.patch ___ Python tracker ___ _

[issue7316] Add a timeout functionality to common locking operations

2009-12-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch against py3k. -- keywords: +needs review Added file: http://bugs.python.org/file15533/timedlock3.patch ___ Python tracker ___

[issue7316] Add a timeout functionality to common locking operations

2009-12-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue7316] Add a timeout functionality to common locking operations

2009-12-05 Thread Andrew Svetlov
Changes by Andrew Svetlov : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue7316] Add a timeout functionality to common locking operations

2009-11-20 Thread Jesse Noller
Changes by Jesse Noller : -- nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7316] Add a timeout functionality to common locking operations

2009-11-17 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: >> Timeouts also interact poorly with condition variables: you >> can time out the initial acquire, but if you wait on a condition there's >> no place to put the timeout on the reacquire. > > I don't see how it's an objection. If you have a condition variable y

[issue7316] Add a timeout functionality to common locking operations

2009-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Timeouts also interact poorly with condition variables: you > can time out the initial acquire, but if you wait on a condition there's > no place to put the timeout on the reacquire. I don't see how it's an objection. If you have a condition variable you ju

[issue7316] Add a timeout functionality to common locking operations

2009-11-17 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: I don't object strongly, but since locks are "supposed" to be held for short amounts of time, a timeout shouldn't be that useful, and when people really need it they can put it together with a condition variable. Timeouts also interact poorly with condition

[issue7316] Add a timeout functionality to common locking operations

2009-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: This patch adds some docs and comments. It also adds the feature in the non-semaphore path of thread_pthread.h, which I had forgotten to address. -- Added file: http://bugs.python.org/file15352/timedlock2.patch ___ P

[issue7316] Add a timeout functionality to common locking operations

2009-11-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is a patch which adds a timeout feature to the locking operations provided by Python. This feature is added at two levels: - the C API level, with a new function PyThread_acquire_lock_timed() - the Python level, with an optional `timeout` argument to the