From c8b2ba9d3fc49749a99aaaf7656fc4e7ae08361e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 20 Nov 2009 14:04:59 +0000 Subject: [PATCH] future GC lock repair svn: r16921 --- src/mzscheme/src/future.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mzscheme/src/future.c b/src/mzscheme/src/future.c index 8b15acc3ac..08f6e87064 100644 --- a/src/mzscheme/src/future.c +++ b/src/mzscheme/src/future.c @@ -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);