From fe9e34f938c5a4fe5e3a99197b37378dde0ef18b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 11 Oct 2011 14:57:36 -0600 Subject: [PATCH] skip future mutex if no futures started Skipping the check makes a measurable difference when several places are running. --- src/racket/src/future.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/racket/src/future.c b/src/racket/src/future.c index b229566927..bae13cc9c3 100644 --- a/src/racket/src/future.c +++ b/src/racket/src/future.c @@ -2238,6 +2238,8 @@ void scheme_check_future_work() check_future_thread_creation(fs); + if (!fs->future_threads_created) return; + more = 1; while (more) { /* Try to get a future waiting on a atomic operation */