Skip to content

gh-155334: Add start parameter to threading.Thread - #155335

Open
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:thread_start
Open

gh-155334: Add start parameter to threading.Thread#155335
vstinner wants to merge 1 commit into
python:mainfrom
vstinner:thread_start

Conversation

@vstinner

@vstinner vstinner commented Aug 7, 2026

Copy link
Copy Markdown
Member

@vstinner

vstinner commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

I wasn't sure about changing the introduction example of threading documentation: https://docs.python.org/dev/library/threading.html#introduction

Should it be updated to use start=True?

...

# Start threads for each link
threads = []
for link in links:
    # Using `args` to pass positional arguments and `kwargs` for keyword arguments
    t = threading.Thread(target=crawl, args=(link,), kwargs={"delay": 2}, start=True)
    threads.append(t)

# Wait for all threads to finish
for t in threads:
    t.join()

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33960377 | 📁 Comparing 6f10271 against main (7c653e2)

  🔍 Preview build  

3 files changed
± library/threading.html
± whatsnew/3.16.html
± whatsnew/changelog.html

@vstinner

vstinner commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

I didn't add the start parameter to the threading.Timer subclass of threading.Thread. It can be added later if start is widely adopted.

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.

1 participant