Ruby progress

pull/1472/head
Craig Tiller 10 years ago
parent 3a4880856a
commit 3c78b4e0de
  1. 9
      src/ruby/ext/grpc/rb_completion_queue.c
  2. 1
      src/ruby/ext/grpc/rb_server.c

@ -80,7 +80,7 @@ static void grpc_rb_completion_queue_shutdown_drain(grpc_completion_queue *cq) {
grpc_completion_queue_shutdown(cq);
next_call.cq = cq;
next_call.event = NULL;
next_call.event.type = GRPC_QUEUE_TIMEOUT;
/* TODO: the timeout should be a module level constant that defaults
* to gpr_inf_future.
*
@ -95,16 +95,11 @@ static void grpc_rb_completion_queue_shutdown_drain(grpc_completion_queue *cq) {
do {
rb_thread_call_without_gvl(grpc_rb_completion_queue_next_no_gil,
(void *)&next_call, NULL, NULL);
if (next_call.event == NULL) {
break;
}
type = next_call.event->type;
type = next_call.event.type;
if (type != GRPC_QUEUE_SHUTDOWN) {
++drained;
rb_warning("completion queue shutdown: %d undrained events", drained);
}
grpc_event_finish(next_call.event);
next_call.event = NULL;
} while (type != GRPC_QUEUE_SHUTDOWN);
}

@ -233,7 +233,6 @@ static VALUE grpc_rb_server_request_call(VALUE self, VALUE cqueue,
}
if (!ev.success) {
grpc_request_call_stack_cleanup(&st);
grpc_event_finish(ev);
rb_raise(grpc_rb_eCallError, "request_call completion failed");
return Qnil;
}

Loading…
Cancel
Save