Logo Search packages:      
Sourcecode: scala version File versions  Download package

final void scala::actors::FJTaskRunner::taskJoin ( final FJTask  w  )  [inline, protected]

Process tasks until w is done. Equivalent to while(!w.isDone()) taskYield();

Definition at line 862 of file FJTaskRunner.java.

References COLLECT_STATS, scala::actors::FJTask::isDone(), pop(), runs, scan(), and scala::actors::FJTask::setDone().

Referenced by scala::actors::FJTask::join(), and slowCoInvoke().

                                                {

    while (!w.isDone()) { 

      FJTask task = pop();
      if (task != null) {
        if (!task.isDone()) {
          if (COLLECT_STATS) ++runs;
          task.run(); 
          task.setDone(); 
          if (task == w) return; // fast exit if we just ran w
        }
      }
      else
        scan(w);
    }
  }


Generated by  Doxygen 1.6.0   Back to index