类 org.logicalcobwebs.concurrent.FJTask
的使用

使用 FJTask 的软件包
org.logicalcobwebs.concurrent Concurrency utilities. 
 

org.logicalcobwebs.concurrentFJTask 的使用
 

org.logicalcobwebs.concurrentFJTask 的子类
static class FJTask.Par
          A new Par, when executed, runs the tasks provided in the constructor in parallel using coInvoke(tasks).
static class FJTask.Par2
          A new Par(task1, task2), when executed, runs task1 and task2 in parallel using coInvoke(task1, task2).
static class FJTask.Seq
          A new Seq, when executed, invokes each task provided in the constructor, in order.
static class FJTask.Seq2
          A new Seq2(task1, task2), when executed, invokes task1 and then task2, in order.
static class FJTask.Wrap
          A FJTask that holds a Runnable r, and calls r.run when executed.
protected static class FJTaskRunnerGroup.InvokableFJTask
          Wrap wait/notify mechanics around a task so that invoke() can wait it out
 

声明为 FJTaskorg.logicalcobwebs.concurrent 中的字段
protected  FJTask FJTask.Seq2.fst
           
protected  FJTask FJTask.Par2.fst
           
protected  FJTask FJTaskRunner.VolatileTaskRef.ref
          The reference
protected  FJTask FJTask.Seq2.snd
           
protected  FJTask FJTask.Par2.snd
           
protected  FJTask[] FJTask.Seq.tasks
           
protected  FJTask[] FJTask.Par.tasks
           
 

返回 FJTaskorg.logicalcobwebs.concurrent 中的方法
protected  FJTask FJTaskRunner.confirmPop(int provisionalTop)
          Check under synch lock if DEQ is really empty when doing pop.
protected  FJTask FJTaskRunner.confirmTake(int oldBase)
          double-check a potential take
protected  FJTask FJTaskRunner.VolatileTaskRef.get()
          Return the reference
static FJTask FJTask.par(FJTask[] tasks)
          Construct and return a FJTask object that, when executed, will invoke the tasks in the tasks array in parallel using coInvoke
static FJTask FJTask.par(FJTask task1, FJTask task2)
          Construct and return a FJTask object that, when executed, will invoke task1 and task2, in parallel
protected  FJTask FJTaskRunnerGroup.pollEntryQueue()
          Return a task from entry queue, or null if empty.
protected  FJTask FJTaskRunner.pop()
          Return a popped task, or null if DEQ is empty.
static FJTask FJTask.seq(FJTask[] tasks)
          Construct and return a FJTask object that, when executed, will invoke the tasks in the tasks array in array order
static FJTask FJTask.seq(FJTask task1, FJTask task2)
          Construct and return a FJTask object that, when executed, will invoke task1 and task2, in order
protected  FJTask FJTaskRunner.take()
          Take a task from the base of the DEQ.
protected  FJTask FJTaskRunner.VolatileTaskRef.take()
          Return the reference and clear it
 

参数类型为 FJTaskorg.logicalcobwebs.concurrent 中的方法
protected  void FJTaskRunner.coInvoke(FJTask[] tasks)
          Array-based version of coInvoke
static void FJTask.coInvoke(FJTask[] tasks)
          Fork all tasks in array, and await their completion.
protected  void FJTaskRunner.coInvoke(FJTask w, FJTask v)
          A specialized expansion of w.fork(); invoke(v); w.join();
static void FJTask.coInvoke(FJTask task1, FJTask task2)
          Fork both tasks and then wait for their completion.
 void FJTaskRunnerGroup.executeTask(FJTask t)
          Specialized form of execute called only from within FJTasks
static void FJTask.invoke(FJTask t)
          Immediately execute task t by calling its run method.
static FJTask FJTask.par(FJTask[] tasks)
          Construct and return a FJTask object that, when executed, will invoke the tasks in the tasks array in parallel using coInvoke
static FJTask FJTask.par(FJTask task1, FJTask task2)
          Construct and return a FJTask object that, when executed, will invoke task1 and task2, in parallel
protected  void FJTaskRunner.push(FJTask r)
          Push a task onto DEQ.
protected  void FJTaskRunner.put(FJTask r)
          Enqueue task at base of DEQ.
protected  void FJTaskRunner.VolatileTaskRef.put(FJTask r)
          Set the reference
protected  void FJTaskRunner.scan(FJTask waitingFor)
          Do all but the pop() part of yield or join, by traversing all DEQs in our group looking for a task to steal.
static FJTask FJTask.seq(FJTask[] tasks)
          Construct and return a FJTask object that, when executed, will invoke the tasks in the tasks array in array order
static FJTask FJTask.seq(FJTask task1, FJTask task2)
          Construct and return a FJTask object that, when executed, will invoke task1 and task2, in order
protected  void FJTaskRunner.slowCoInvoke(FJTask[] tasks)
          Backup to handle atypical or noninlinable cases of coInvoke
protected  void FJTaskRunner.slowCoInvoke(FJTask w, FJTask v)
          Backup to handle noninlinable cases of coInvoke
protected  void FJTaskRunner.slowPush(FJTask r)
          Handle slow case for push
protected  void FJTaskRunner.taskJoin(FJTask w)
          Process tasks until w is done.
 

参数类型为 FJTaskorg.logicalcobwebs.concurrent 中的构造方法
FJTask.Par(FJTask[] tasks)
          Construct a Seq that, when executed, will process each of the tasks in the tasks array in parallel
FJTask.Par(FJTask task1, FJTask task2)
          Two-task constructor, for compatibility with previous release.
FJTask.Par2(FJTask task1, FJTask task2)
           
FJTask.Seq(FJTask[] tasks)
          Construct a Seq that, when executed, will process each of the tasks in the tasks array in order
FJTask.Seq(FJTask task1, FJTask task2)
          Two-task constructor, for compatibility with previous release.
FJTask.Seq2(FJTask task1, FJTask task2)
           
 



Copyright © 2014. All rights reserved.