setprofile accepts None (#3239)

The function `threading.setprofile` can be called with a `None` value to
clear the profile function. This does unset the function from the
existing threads, it only clears the callback function so that new
threads are created without the profiling hook installed.
This commit is contained in:
Augusto Hack
2019-09-17 13:15:27 +02:00
committed by Sebastian Rittau
parent babc0c1912
commit 4c63939585

View File

@@ -30,7 +30,7 @@ if sys.version_info >= (3, 4):
def main_thread() -> Thread: ...
def settrace(func: _TF) -> None: ...
def setprofile(func: _PF) -> None: ...
def setprofile(func: Optional[_PF]) -> None: ...
def stack_size(size: int = ...) -> int: ...
if sys.version_info >= (3,):