homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Genarito
Recipients Genarito
Date 2021年04月26日.20:59:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619470785.38.0.461987263008.issue43944@roundup.psfhosted.org>
In-reply-to
Content
I've a piece of code that submits a task to a [ThreadPoolExecutor][1] which starts a [Process][2]. I've realised that in Python 3.8 that Process finished with exit code `0`. But I've updated Python to the 3.9 version and this started to finishing with exit code `1`! Even when the Process executes an empty task.
Here's a minimal example:
```python
from multiprocessing import Process
from concurrent.futures import ThreadPoolExecutor
def some_task():
 pass
def execute_error():
 p = Process(target=some_task)
 p.start()
 p.join()
 print(p.exitcode) # This is always 1 on a ThreadPoolExecutor!!!
executor = ThreadPoolExecutor(max_workers=4)
executor.submit(execute_error)
# execute_error() # IMPORTANT: this works correctly (exit 0)
```
My versions:
```
Ubuntu 21.04
Python 3.9.4
```
**Note** that if `__execute_error` is called outside the ThreadPoolExecutor it works correctly.
Running on Python 3.8.6 exitcode = 0 too.
 [1]: https://docs.python.org/3/library/concurrent.futures.html#threadpoolexecutor
 [2]: https://docs.python.org/3.9/library/multiprocessing.html#multiprocessing.Process 
History
Date User Action Args
2021年04月26日 20:59:45Genaritosetrecipients: + Genarito
2021年04月26日 20:59:45Genaritosetmessageid: <1619470785.38.0.461987263008.issue43944@roundup.psfhosted.org>
2021年04月26日 20:59:45Genaritolinkissue43944 messages
2021年04月26日 20:59:45Genaritocreate

AltStyle によって変換されたページ (->オリジナル) /