pyconcrete
pyconcrete copied to clipboard
pyconcrete and multiprocessing
Hello,
I am trying to use pyconcrete to encrypt a python code using multiprocessing. This is the code:
from math import sqrt
from joblib import Parallel, delayed
Parallel(n_jobs=2)(delayed(sqrt)(i ** 2) for i in range(10))
The compilation works fine, but at execution time the program crashes with the following message:
Exception ignored in: <module 'threading' from '/Users/stefanosavare/anaconda3/lib/python3.6/threading.py'>
Traceback (most recent call last):
File "/Users/stefanosavare/anaconda3/lib/python3.6/threading.py", line 1289, in _shutdown
assert tlock.locked()
SystemError: <built-in method locked of _thread.lock object at 0x1051e83c8> returned a result with an error set
Is there a way to fix it?
Thank you a lot!
Hi,
It seems happened when the script use threading https://stackoverflow.com/questions/27844676/assertionerror-3-x-only-when-calling-py-finalize-with-threads
Because pyconcrete doesn't initialize threading in CPython, but joblib did
Need sometime to investigate how to deal with it
Hi!,
I had the same error using PyQt5 with some QtWidgets
Exception ignored in: <module 'threading' from '/usr/lib/python3.6/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 1289, in _shutdown
assert tlock.locked()
SystemError: <built-in method locked of _thread.lock object at 0x7f0442904f58> returned a result with an error set
Had you something progress with this? it would be fantastic.
Thank you a lot!
@Falldog
is this problem solved ?
threading error should be same with #71