Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os as _os
import sys as _sys
import _thread
import functools
import warnings
import _weakref

Expand Down Expand Up @@ -1630,6 +1629,7 @@ def _register_atexit(func, *arg, **kwargs):
if _SHUTTING_DOWN:
raise RuntimeError("can't register atexit after shutdown")

import functools
call = functools.partial(func, *arg, **kwargs)
_threading_atexits.append(call)
Comment thread
danielhollas marked this conversation as resolved.
Outdated

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Reduce the import time of :mod:`threading` module by ~50%. Patch by Daniel Hollas.