bpo-41149: Fix a bug in threading that causes fals-y threads callables to fail to start. (GH-21201)

This commit is contained in:
BarneyStratford 2021-02-02 20:24:24 +00:00 committed by GitHub
parent 58fb156edd
commit 01c4fddc4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -906,7 +906,7 @@ class Thread:
"""
try:
if self._target:
if self._target is not None:
self._target(*self._args, **self._kwargs)
finally:
# Avoid a refcycle if the thread is running a function with