Skip to content

gh-156131: threading: add run() and run_daemon() to start threads easily - #156178

Open
rqndom wants to merge 3 commits into
python:mainfrom
rqndom:gh-156131
Open

gh-156131: threading: add run() and run_daemon() to start threads easily#156178
rqndom wants to merge 3 commits into
python:mainfrom
rqndom:gh-156131

Conversation

@rqndom

@rqndom rqndom commented Aug 21, 2026

Copy link
Copy Markdown

Add

  • threading.run(func, /, *args, **kwargs)
  • threading.run_daemon(func, /, *args, **kwargs)

to replace the often used recipe of

t = threading.Thread(target=func, args=args, kwargs=kwargs)
t.daemon = True
t.start()

@python-cla-bot

python-cla-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

read-the-docs-community Bot commented Aug 21, 2026

Copy link
Copy Markdown

Comment thread Doc/library/threading.rst Outdated
Comment thread Doc/library/threading.rst Outdated
Comment thread Doc/library/threading.rst Outdated
Comment thread Lib/threading.py Outdated
Comment thread Doc/library/threading.rst
Comment thread Doc/library/threading.rst Outdated
@rqndom
rqndom requested a review from AA-Turner as a code owner August 21, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants