[issue45021] Race condition in thread.py

2021-08-28 Thread nullptr
nullptr added the comment: Simplifying the reproducing example a bit more: from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor from time import sleep def submit(pool): pool.submit(submit, pool) if __name__ == '__main__': pool = ThreadPool

[issue45021] Race condition in thread.py

2021-08-27 Thread nullptr
nullptr added the comment: I don't think so: this issue would only arise when using fork on linux and not spawn (win/osx) like it seems your system is doing -- ___ Python tracker <https://bugs.python.org/is

[issue45021] Race condition in thread.py

2021-08-26 Thread nullptr
nullptr added the comment: A more direct way to reproduce from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor from time import sleep def worker(): with ProcessPoolExecutor() as pool: r = list(pool.map(sleep, [0.01] * 8)) def submit(pool): pool.submit

[issue45021] Race condition in thread.py

2021-08-26 Thread nullptr
Change by nullptr : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue45021> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45021] Race condition in thread.py

2021-08-26 Thread nullptr
New submission from nullptr : The following code can sometimes hang up import random from concurrent.futures import ProcessPoolExecutor, ThreadPoolExecutor from time import sleep def worker