8000 gh-109653: Speedup import of threading module by danielhollas · Pull Request #114509 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

8000 gh-109653: Speedup import of threading module #114509

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Let's got with lambda instead of functools.partial
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
danielhollas and AlexWaygood authored Jan 24, 2024
commit e76cec2d321817c0914b7693dc7c1fac98bdc67b
4 changes: 1 addition & 3 deletions Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,9 +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)
_threading_atexits.append(lambda: func(*arg, **kwargs))


from _thread import stack_size
Expand Down
0