adriank / ObjectPath

The agile query language for semi-structured data
http://objectpath.org
MIT License
380 stars 93 forks source link

ValueError: generator already executing #83

Closed felixlu closed 2 years ago

felixlu commented 5 years ago

I am using objectpath in my dramatiq workers, with both multiple processes and threads enabled. Recently I found many "ValueError: generator already executing" in the error log. However I cannot reproduce the problem with the exactly same data and code manually. I googled the exception, and it turns out that's probably a thread-safe related problem.

adriank commented 5 years ago

ObjectPath is not thread safe. It uses bunch of global etc. Due to performance issues I didn't wrap the code into a class, but you can easily do it if you like.

Adrian

On Mon, 21 Jan 2019 at 03:55 Felix Lu notifications@github.com wrote:

I am using objectpath in my dramatiq https://dramatiq.io/ workers, with both multiple processes and threads enabled. Recently I found many "ValueError: generator already executing" in the error log. However I cannot reproduce the problem with the exactly same data and code manually. I googled the exception, and it turns out that's probably a thread-safe related problem.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adriank/ObjectPath/issues/83, or mute the thread https://github.com/notifications/unsubscribe-auth/AAKyctFOy4lyOyZH7EcpOwSG6vrHHeAMks5vFSw7gaJpZM4aKBNv .

-- Greetings, Adrian Kalbarczyk

http://kalbarczyk.co