Fixed Ruby build on Mac

pull/4843/head
murgatroid99 9 years ago
parent 1a39077b64
commit 25122bf811
  1. 2
      src/ruby/ext/grpc/rb_call_credentials.c
  2. 3
      src/ruby/ext/grpc/rb_event_thread.c

@ -78,6 +78,7 @@ static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) {
static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
VALUE exception_object) {
(void)args;
VALUE result = rb_hash_new();
rb_hash_aset(result, rb_str_new2("metadata"), Qnil);
/* Currently only gives the exception class name. It should be possible get
@ -132,6 +133,7 @@ static void grpc_rb_call_credentials_plugin_get_metadata(
}
static void grpc_rb_call_credentials_plugin_destroy(void *state) {
(void)state;
// Not sure what needs to be done here
}

@ -102,6 +102,7 @@ static void grpc_rb_event_queue_destroy() {
static void *grpc_rb_wait_for_event_no_gil(void *param) {
grpc_rb_event *event = NULL;
(void)param;
gpr_mu_lock(&event_queue.mu);
while ((event = grpc_rb_event_queue_dequeue()) == NULL) {
gpr_cv_wait(&event_queue.cv,
@ -117,6 +118,7 @@ static void *grpc_rb_wait_for_event_no_gil(void *param) {
}
static void grpc_rb_event_unblocking_func(void *arg) {
(void)arg;
gpr_mu_lock(&event_queue.mu);
event_queue.abort = true;
gpr_cv_signal(&event_queue.cv);
@ -127,6 +129,7 @@ static void grpc_rb_event_unblocking_func(void *arg) {
* events */
static VALUE grpc_rb_event_thread(VALUE arg) {
grpc_rb_event *event;
(void)arg;
while(true) {
event = (grpc_rb_event*)rb_thread_call_without_gvl(
grpc_rb_wait_for_event_no_gil, NULL,

Loading…
Cancel
Save