[New-bugs-announce] [issue18078] threading.Condition to allow notify on a specific waiter
report at bugs.python.org
Tue May 28 05:40:19 CEST 2013
New submission from João Bernardo:
If users could provide an inner lock for `threading.Condition` acquire when making a thread wait, it would allow for notifying a specific waiter.
Because of race conditions, using:
may not wake the thread I want. Also, I may not want to wake the first waiter at all.
So my proposal is something along the lines:
def wait(self, timeout=None, lock=None):
waiter = _allocate_lock() if lock is None else lock
def notify_one(self, lock):
# Maybe could notify a list of locks?
# Maybe RuntimeError("Lock not waiting in this Condition")
components: Library (Lib)
title: threading.Condition to allow notify on a specific waiter
versions: Python 3.4
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce