skip future mutex if no futures started

Skipping the check makes a measurable difference when
several places are running.
This commit is contained in:
Matthew Flatt 2011-10-11 14:57:36 -06:00
parent a9b1a38f34
commit fe9e34f938

View File

@ -2238,6 +2238,8 @@ void scheme_check_future_work()
check_future_thread_creation(fs); check_future_thread_creation(fs);
if (!fs->future_threads_created) return;
more = 1; more = 1;
while (more) { while (more) {
/* Try to get a future waiting on a atomic operation */ /* Try to get a future waiting on a atomic operation */