future GC lock repair

svn: r16921
This commit is contained in:
Matthew Flatt 2009-11-20 14:04:59 +00:00
parent 1991cde5a7
commit c8b2ba9d3f

View File

@ -866,13 +866,13 @@ void future_do_runtimecall(void *func,
//Wait for the signal that the RT call is finished
future->can_continue_cv = &worker_can_continue_cv;
end_gc_not_ok(future);
while (future->can_continue_cv) {
end_gc_not_ok(future);
pthread_cond_wait(&worker_can_continue_cv, &g_future_queue_mutex);
start_gc_not_ok();
//Fetch the future instance again, in case the GC has moved the pointer
future = current_ft;
}
start_gc_not_ok();
pthread_mutex_unlock(&g_future_queue_mutex);