You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Pybind11 extension module with spawns multiple C++ threads. If the extension module is the Python thread A and a spawned C++ thread B, is there a way to import Pure Python modules in thread B?
It works when the same Python thread A calls imports and calls back into Python.
When the thread is B (C++), even though I have released the gil in thread A and acquired it in thread B, the import call silently fails.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a Pybind11 extension module with spawns multiple C++ threads. If the extension module is the Python thread A and a spawned C++ thread B, is there a way to import Pure Python modules in thread B?
It works when the same Python thread A calls imports and calls back into Python.
When the thread is B (C++), even though I have released the gil in thread A and acquired it in thread B, the import call silently fails.
Beta Was this translation helpful? Give feedback.
All reactions