File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ struct internals {
345345 // original owning interpreter is active.
346346 auto *cur_istate = get_interpreter_state_unchecked ();
347347 if (cur_istate && cur_istate == istate) {
348+ gil_scoped_acquire_simple gil;
348349 Py_CLEAR (instance_base);
349350 Py_CLEAR (default_metaclass);
350351 Py_CLEAR (static_property_type);
@@ -378,6 +379,7 @@ struct local_internals {
378379 // original owning interpreter is active.
379380 auto *cur_istate = get_interpreter_state_unchecked ();
380381 if (cur_istate && cur_istate == istate) {
382+ gil_scoped_acquire_simple gil;
381383 Py_CLEAR (function_record_py_type);
382384 }
383385 }
@@ -877,6 +879,7 @@ inline local_internals &get_local_internals() {
877879 auto &ppmgr = get_local_internals_pp_manager ();
878880 auto &internals_ptr = *ppmgr.get_pp ();
879881 if (!internals_ptr) {
882+ gil_scoped_acquire_simple gil;
880883 internals_ptr.reset (new local_internals ());
881884 }
882885 return *internals_ptr;
You can’t perform that action at this time.
0 commit comments