Skip to content

Commit

Permalink
Callback should work asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Nov 12, 2023
1 parent 520f139 commit f4d8a05
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions ext/ilios/future.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,6 @@ static VALUE future_on_success(VALUE self)

cassandra_future->on_success_block = rb_block_proc();

if (cass_future_ready(cassandra_future->future)) {
rb_mutex_unlock(cassandra_future->proc_mutex);
uv_sem_post(&cassandra_future->sem);
if (cass_future_error_code(cassandra_future->future) == CASS_OK) {
future_result_success_yield(cassandra_future);
}
return self;
}

if (wakeup_thread) {
future_queue_push(future_thread_pool_get(cassandra_future), self);
}
Expand Down Expand Up @@ -259,15 +250,6 @@ static VALUE future_on_failure(VALUE self)

cassandra_future->on_failure_block = rb_block_proc();

if (cass_future_ready(cassandra_future->future)) {
rb_mutex_unlock(cassandra_future->proc_mutex);
uv_sem_post(&cassandra_future->sem);
if (cass_future_error_code(cassandra_future->future) != CASS_OK) {
future_result_failure_yield(cassandra_future);
}
return self;
}

if (wakeup_thread) {
future_queue_push(future_thread_pool_get(cassandra_future), self);
}
Expand Down

0 comments on commit f4d8a05

Please sign in to comment.