Execute NIF calls on non-scheduler threads asynchronously #6

Merged
gburd merged 72 commits from gsb-async-nifs3 into master 2013-04-23 00:54:56 +00:00
Showing only changes of commit f7219dcaec - Show all commits

View file

@ -1550,7 +1550,8 @@ __resource_conn_dtor(ErlNifEnv *env, void *obj)
WterlConnHandle *conn_handle = (WterlConnHandle *)obj; WterlConnHandle *conn_handle = (WterlConnHandle *)obj;
/* Free up the shared sessions and cursors. */ /* Free up the shared sessions and cursors. */
enif_mutex_lock(conn_handle->context_mutex); enif_mutex_lock(conn_handle->context_mutex);
for (int i = 0; i < conn_handle->num_contexts; i++) { int i;
for (i = 0; i < conn_handle->num_contexts; i++) {
WterlCtx *ctx = &conn_handle->contexts[i]; WterlCtx *ctx = &conn_handle->contexts[i];
WT_CURSOR *cursor; WT_CURSOR *cursor;
kh_foreach_value(ctx->cursors, cursor, { kh_foreach_value(ctx->cursors, cursor, {