Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,12 @@ def __init__(self, lock=None):
# If the lock defines _release_save() and/or _acquire_restore(),
# these override the default implementations (which just call
# release() and acquire() on the lock). Ditto for _is_owned().
try:
if hasattr(lock, '_release_save'):
self._release_save = lock._release_save
except AttributeError:
pass
try:
if hasattr(lock, '_acquire_restore'):
self._acquire_restore = lock._acquire_restore
except AttributeError:
pass
try:
if hasattr(lock, '_is_owned'):
self._is_owned = lock._is_owned
except AttributeError:
pass
self._waiters = _deque()

def _at_fork_reinit(self):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a minor performance regression in :func:`threading.Event.__init__`