Ejemplo n.º 1
0
        /// <summary>
        /// Completes a task (verb run).
        /// </summary>
        /// <remarks>
        /// Note that for Async verb workers, this method runs on a separate thread.
        /// </remarks>
        /// <param name="verb">The verb which was run.</param>
        /// <param name="worker">The verb's worker.</param>
        private void completeTask(IVerb verb, IVerbWorker worker)
        {
            this.taskCompletionsLock.AcquireWriterLock(Timeout.Infinite);
            Disposition    disp = worker.Complete();
            TaskCompletion tc   = new TaskCompletion(worker.GetWorkingDirectory(), verb, disp);

            this.taskCompletions.Add(tc);
            this.completionEvent.Set();
            this.taskCompletionsLock.ReleaseWriterLock();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Completes a task (verb run).
 /// </summary>
 /// <remarks>
 /// Note that for Async verb workers, this method runs on a separate thread.
 /// </remarks>
 /// <param name="verb">The verb which was run.</param>
 /// <param name="worker">The verb's worker.</param>
 private void completeTask(IVerb verb, IVerbWorker worker)
 {
     this.taskCompletionsLock.AcquireWriterLock(Timeout.Infinite);
     Disposition disp = worker.Complete();
     TaskCompletion tc = new TaskCompletion(worker.GetWorkingDirectory(), verb, disp);
     this.taskCompletions.Add(tc);
     this.completionEvent.Set();
     this.taskCompletionsLock.ReleaseWriterLock();
 }