diff options
author | Gregory P. Smith <greg@krypto.org> | 2017-05-29 17:03:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 17:03:41 (GMT) |
commit | 163468a766e16604bdea04a1ab808c0d3e729e5d (patch) | |
tree | d9c9bb6da480f4d7e9070e83a010798da5c30a6f /Lib/threading.py | |
parent | eba68e2c42e149acecb15bbeb692786e2540157d (diff) | |
download | cpython-163468a766e16604bdea04a1ab808c0d3e729e5d.zip cpython-163468a766e16604bdea04a1ab808c0d3e729e5d.tar.gz cpython-163468a766e16604bdea04a1ab808c0d3e729e5d.tar.bz2 |
bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)
Instead use keyword only arguments to os.register_at_fork for each of the scenarios.
Updates the documentation for clarity.
Diffstat (limited to 'Lib/threading.py')
-rw-r--r-- | Lib/threading.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/threading.py b/Lib/threading.py index 2eaf49a..92c2ab3 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -1359,5 +1359,5 @@ def _after_fork(): assert len(_active) == 1 -if hasattr(_os, "fork"): - _os.register_at_fork(_after_fork, when="child") +if hasattr(_os, "register_at_fork"): + _os.register_at_fork(after_in_child=_after_fork) |