This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients gps, pitrou
Date 2009-11-13.17:31:38
SpamBayes Score 1.9993668e-10
Marked as misclassified No
Message-id <1258133508.5.0.728130823639.issue7316@psf.upfronthosting.co.za>
In-reply-to
Content
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 acquire()
method of Lock and RLock objects (it also helps simplify the wait()
function of Condition objects)

The timeout duration is expressed in microseconds at the C API level,
and in seconds at the Python API level. There is also a new Python-level
constant, `_thread.TIMEOUT_MAX`, indicating the max allowable timeout
value (values above this raise an OverflowError).

At the C level, the max timeout is PY_TIMEOUT_MAX (in microseconds). The
caller should check the value him/herself.

The patch contains both a POSIX implementation and a Windows
implementation. It still lacks docs.
History
Date User Action Args
2009-11-13 17:31:48pitrousetrecipients: + pitrou, gps
2009-11-13 17:31:48pitrousetmessageid: <1258133508.5.0.728130823639.issue7316@psf.upfronthosting.co.za>
2009-11-13 17:31:47pitroulinkissue7316 messages
2009-11-13 17:31:46pitroucreate