Is it possible to safely drop GIL in main thread? #5043
Unanswered
FantasqueX
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to drop GIL in main thread right after
pybind11::initialize_interpreter
. So, I usestatic pybind11::gil_scoped_release scoped_release;
. However, there will be a data race when usingpybind11::gil_scoped_acquire scoped_acquire;
multithreaded. Because,pybind11/include/pybind11/detail/internals.h
Line 327 in 8b48ff8
pybind11/include/pybind11/gil.h
Line 145 in 8b48ff8
Beta Was this translation helpful? Give feedback.
All reactions