| Bug #99796 | Python multiprocessing not working | ||
|---|---|---|---|
| Submitted: | 7 Jun 2020 12:07 | Modified: | 28 Sep 2022 15:22 |
| Reporter: | Jesper Wisborg Krogh | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Shell General / Core Client | Severity: | S2 (Serious) |
| Version: | 8.0.20 | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
[7 Jun 2020 12:07]
Jesper Wisborg Krogh
[7 Jun 2020 12:07]
Jesper Wisborg Krogh
The workaround is to use the threading module (and the queue module if you need queues) instead.
[8 Jun 2020 12:32]
MySQL Verification Team
Dear Jesper, Thank you for the report and feedback. regards, Umesh
[25 Aug 2022 0:20]
Alfredo Kojima
Posted by developer:
The test case is wrong as it doesn't work in plain python either.
This is a correct test case:
$ cat /tmp/a.py
import multiprocessing
def run_proc():
print(f'Hello World')
if __name__ == "__main__":
proc = multiprocessing.Process(target=run_proc)
proc.start()
proc.join()
proc.close()
$ python3 /tmp/a.py
Hello World
That said, this bug can be fixed.
[28 Sep 2022 15:22]
Edward Gilmore
Posted by developer: Added the following note to the MySQL Shell 8.0.31 release notes: Support was added for Python modules which invoke the Python interpreter, such as multiprocessing.
