make sure waitfuture awakens when indeed its future is ready.
authorGengbin Zheng <gzheng@illinois.edu>
Mon, 3 May 2010 01:31:04 +0000 (20:31 -0500)
committerGengbin Zheng <gzheng@illinois.edu>
Mon, 3 May 2010 01:31:04 +0000 (20:31 -0500)
src/ck-core/ckfutures.C

index 4811103eaf361f998f3a53f51739a8a03b033bee..567989dbdfc2f2e8fbb2722328bc7f15fb19fb10 100644 (file)
@@ -184,7 +184,7 @@ void *CkWaitFuture(CkFutureID handle)
   if (!(fut->ready)) {
     CthSetNext(self, fut->waiters);
     fut->waiters = self;
-    CthSuspend();
+    while (!(fut->ready)) CthSuspend();
   }
   fut = (fs->array)+handle;
   value = fut->value;