-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Operating system:Win10
import os
from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor
print(f"001 at {os.getpid()}")
def task():
print("hello world")
# print("002")
if __name__ == '__main__':
print(f"002 --- {os.getpid()}")
pool = ProcessPoolExecutor(max_workers=10)
pool.submit(task, *())
pool.shutdown(True)
Unexpected output,Why does 001 appear twice?
001 at 18836
002 --- 18836
001 at 68124
hello world
I tried it on linux without any problems,I guess ProcessPoolExecutor is not so friendly for windows support.
CPython versions tested on:
3.8, 3.10, 3.11
Operating systems tested on:
Windows
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status