File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1070,22 +1070,8 @@ static void multi_executor_stop(void) {
10701070 g_multi_executor_initialized = false;
10711071}
10721072
1073- /* ============================================================================
1074- * Free-threaded execution (Python 3.13+ nogil)
1075- * ============================================================================ */
1076-
1077- #ifdef HAVE_FREE_THREADED
1078- /**
1079- * Execute a request directly in free-threaded mode.
1080- * No GIL management needed - Python handles synchronization internally.
1073+ /*
1074+ * Note: Free-threaded execution (Python 3.13+ nogil) is handled inline
1075+ * in executor_enqueue() using PyGILState_Ensure/Release which are no-ops
1076+ * in free-threaded builds but still work correctly.
10811077 */
1082- static ERL_NIF_TERM execute_direct (ErlNifEnv * env , py_request_t * req ) {
1083- /* In free-threaded mode, PyGILState functions still work but are essentially no-ops */
1084- PyGILState_STATE gstate = PyGILState_Ensure ();
1085-
1086- process_request (req );
1087-
1088- PyGILState_Release (gstate );
1089- return req -> result ;
1090- }
1091- #endif
Original file line number Diff line number Diff line change @@ -254,9 +254,6 @@ typedef struct async_pending {
254254 /** @brief PID of the Erlang process awaiting the result */
255255 ErlNifPid caller ;
256256
257- /** @brief Reference term for correlation (unused, reserved) */
258- ERL_NIF_TERM ref ;
259-
260257 /** @brief Next pending operation in the queue */
261258 struct async_pending * next ;
262259} async_pending_t ;
You can’t perform that action at this time.
0 commit comments