Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyconcrete and multiprocessing #53

Open
deatinor opened this issue Jan 16, 2019 · 4 comments
Open

pyconcrete and multiprocessing #53

deatinor opened this issue Jan 16, 2019 · 4 comments
Labels

Comments

@deatinor
Copy link

deatinor commented Jan 16, 2019

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!

@Falldog
Copy link
Owner

Falldog commented Jan 17, 2019

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

@Falldog Falldog added the bug label Jan 17, 2019
@NachoJuanDev
Copy link

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 Falldog changed the title pyconcrete and multiprocessing pyconcrete and multithreading Jul 12, 2019
This was referenced Jul 12, 2019
@Falldog Falldog changed the title pyconcrete and multithreading pyconcrete and multiprocessing Jul 13, 2019
@MyraBaba
Copy link

MyraBaba commented Jan 1, 2020

@Falldog

is this problem solved ?

@Falldog
Copy link
Owner

Falldog commented Sep 26, 2021

threading error should be same with #71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants