Antoine Pitrou pit...@free.fr added the comment:
Thank you! Checked in in r80071.
--
resolution: accepted - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Torsten Landschoff t.landsch...@gmx.net 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 rep...@bugs.python.org
Antoine Pitrou pit...@free.fr 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
Jeffrey Yasskin jyass...@gmail.com added the comment:
Thanks, looks good. Sorry for the delay.
--
resolution: - accepted
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
Antoine Pitrou pit...@free.fr 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,
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file15795/timedlock4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
Changes by Brian Curtin cur...@acm.org:
--
nosy: +brian.curtin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
___
Python-bugs-list mailing
Antoine Pitrou pit...@free.fr added the comment:
Updated patch against newest py3k.
--
Added file: http://bugs.python.org/file15795/timedlock4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file15321/timedlock.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file15352/timedlock2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file15533/timedlock3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
Antoine Pitrou pit...@free.fr added the comment:
Updated patch against py3k.
--
keywords: +needs review
Added file: http://bugs.python.org/file15533/timedlock3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - pitrou
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
___
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
___
Python-bugs-list
Changes by Jesse Noller jnol...@gmail.com:
--
nosy: +jnoller
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7316
___
___
Python-bugs-list mailing
Antoine Pitrou pit...@free.fr 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
Jeffrey Yasskin jyass...@gmail.com 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
Antoine Pitrou pit...@free.fr 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
Jeffrey Yasskin jyass...@gmail.com 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
New submission from Antoine Pitrou pit...@free.fr:
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`
20 matches
Mail list logo