Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/ruby/ext/grpc/rb_completion_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ grpc_event rb_completion_queue_pluck(grpc_completion_queue* queue, void* tag,
grpc_absl_log_str(GPR_DEBUG, "CQ pluck loop begin: ", reason);
do {
next_call.interrupted = 0;
rb_nogvl(grpc_rb_completion_queue_pluck_no_gil,
(void*)&next_call, unblock_func,
(void*)&next_call,
RB_NOGVL_OFFLOAD_SAFE);
rb_nogvl(grpc_rb_completion_queue_pluck_no_gil, (void*)&next_call,
unblock_func, (void*)&next_call, RB_NOGVL_OFFLOAD_SAFE);
if (next_call.event.type != GRPC_QUEUE_TIMEOUT) break;
} while (next_call.interrupted);
grpc_absl_log_str(GPR_DEBUG, "CQ pluck loop done: ", reason);
Expand Down
10 changes: 5 additions & 5 deletions src/ruby/ext/grpc/rb_event_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ static VALUE grpc_rb_event_thread(void* arg) {
#ifdef RB_NOGVL_OFFLOAD_SAFE

#endif
event = (grpc_rb_event*)rb_nogvl(
grpc_rb_wait_for_event_no_gil, NULL, grpc_rb_event_unblocking_func,
NULL, RB_NOGVL_OFFLOAD_SAFE);
event = (grpc_rb_event*)rb_nogvl(grpc_rb_wait_for_event_no_gil, NULL,
grpc_rb_event_unblocking_func, NULL,
RB_NOGVL_OFFLOAD_SAFE);
if (event == NULL) {
// Indicates that the thread needs to shut down
break;
Expand Down Expand Up @@ -163,8 +163,8 @@ void grpc_rb_event_queue_thread_stop() {
"GRPC_RUBY: call credentials thread stop: thread not running");
return;
}
rb_nogvl(grpc_rb_event_unblocking_func_wrapper, NULL, NULL,
NULL, RB_NOGVL_OFFLOAD_SAFE);
rb_nogvl(grpc_rb_event_unblocking_func_wrapper, NULL, NULL, NULL,
RB_NOGVL_OFFLOAD_SAFE);
rb_funcall(g_event_thread, rb_intern("join"), 0);
g_event_thread = Qnil;
}