示例#1
0
 /**
  * Asynchronously wait for the result of a computation.
  *
  * Call `await Go(computation)` to wait for the result.
  */
 public IAsyncResult BeginGo(Computation c, AsyncCallback callback, object asyncState)
 {
     state = new AsyncResult(this, callback, asyncState);
     state.Prepare(c);
     return(state);
 }
 public PrintResult(TaskMaster task_master, Computation source, string output_filename)
 {
     this.task_master     = task_master;
     this.source          = source;
     this.output_filename = output_filename;
 }
示例#3
0
 /**
  * Add a computation to be executed.
  */
 public void Slot(Computation computation)
 {
     computations.Enqueue(computation);
 }