[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2021-03-16 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix false positives in circular import detection with from-imports ___ Python tracker

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2021-03-15 Thread doublex
doublex added the comment: Example code (fails): import os, concurrent.futures def parallel_callback( arg ): return os.getpid() def parallel( *args ): def thread_callback( param ): with concurrent.futures.ProcessPoolExecutor(max_workers=1) as executor: future =

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2021-02-17 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2020-12-28 Thread Cebtenzzre
Change by Cebtenzzre : -- nosy: +cebtenzzre ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2020-10-22 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: Some my observation at https://discuss.python.org/t/differences-between-3-8-and-3-9-in-importing-module/5520 . -- ___ Python tracker ___

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2020-10-22 Thread Atsuo Ishimoto
Atsuo Ishimoto added the comment: multiprocessing module used to work multithread environment until https://bugs.python.org/issue35943 merged. I guess we can make multiprocessing thread-safe again if we move local imports to global. Does it make sense? -- nosy: +ishimoto

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2020-08-17 Thread Irit Katriel
Irit Katriel added the comment: I think this is no a bug, on the basis that multiprocessing.Pool is not thread-safe. -- ___ Python tracker ___

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2020-08-17 Thread Irit Katriel
Irit Katriel added the comment: I see the same in Python 3.10 on windows 10. If I change the relative imports to absolute imports in a couple of functions in multiprocessing.context as below, the attached (pool_error_on_3.9.py) script not longer raises the exception. def

[issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1

2020-08-17 Thread Carl Drougge
New submission from Carl Drougge : If several threads try to start a multiprocessing.Pool at the same time when no pool has been started before this often fails with an exception like this (the exact import varies): Exception in thread Thread-2: Traceback (most recent call last): File