Skip to content

Sync intro-to-threading with the updated tutorial - #885

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/intro-to-python-threading-20261014
Oct 21, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/intro-to-python-threading-20261014

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Syncs intro-to-threading/ with the maintenance update of An Intro to Threading in Python.

Changes

  • single_thread.py: x.start() was commented out and x.join() was active, so the script crashed with RuntimeError: cannot join thread before it is started. Now matches the tutorial's first listing (start the thread, join commented out).
  • fixrace.py: log messages now read Testing update. to match the tutorial, which says the calling code stays the same as in racecond.py and whose output now shows Testing update..
  • prodcom_better_queue.py: consumer() checked the global pipeline.empty() instead of its own queue parameter. Now uses queue.empty(), as in the tutorial.

Links

Verification

  • Ran every script in the folder on Python 3.14.6 (stdlib only, no requirements). All exit cleanly, including single_thread.py, which crashed before.
  • uvx ruff@0.14.1 format --check intro-to-threading and uvx ruff@0.14.1 check intro-to-threading both pass.

🤖 Generated with Claude Code

@realpython-bot
realpython-bot merged commit b4b59c9 into master Oct 21, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/intro-to-python-threading-20261014 branch October 21, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant