Beispiel #1
0
 /// <summary>
 /// Requests to reacquire the node.
 /// Thread safe, however Reaquire cannot be called unless the
 /// last call to Yield or Reaquire was Yield.
 /// </summary>
 public void Reacquire()
 {
     lock (_callbackMonitor)
     {
         IRequestBuilderCallback builderCallback = _requestEntry.Builder as IRequestBuilderCallback;
         ErrorUtilities.VerifyThrow(_yieldThreadId != -1, "Cannot call Reacquire() before Yield().");
         ErrorUtilities.VerifyThrow(_yieldThreadId == Thread.CurrentThread.ManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Thread.CurrentThread.ManagedThreadId, _yieldThreadId);
         builderCallback.Reacquire();
         _yieldThreadId = -1;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Requests to reacquire the node.
 /// Thread safe, however Reacquire cannot be called unless the
 /// last call to Yield or Reacquire was Yield.
 /// </summary>
 public void Reacquire()
 {
     lock (_callbackMonitor)
     {
         IRequestBuilderCallback builderCallback = _requestEntry.Builder as IRequestBuilderCallback;
         ErrorUtilities.VerifyThrow(_yieldThreadId != -1, "Cannot call Reacquire() before Yield().");
         ErrorUtilities.VerifyThrow(_yieldThreadId == Thread.CurrentThread.ManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Thread.CurrentThread.ManagedThreadId, _yieldThreadId);
         MSBuildEventSource.Log.ExecuteTaskYieldStop(_taskLoggingContext.TaskName, _taskLoggingContext.BuildEventContext.TaskId);
         MSBuildEventSource.Log.ExecuteTaskReacquireStart(_taskLoggingContext.TaskName, _taskLoggingContext.BuildEventContext.TaskId);
         builderCallback.Reacquire();
         MSBuildEventSource.Log.ExecuteTaskReacquireStop(_taskLoggingContext.TaskName, _taskLoggingContext.BuildEventContext.TaskId);
         _yieldThreadId = -1;
     }
 }
 /// <summary>
 /// Reacquires the node.
 /// </summary>
 void IRequestBuilderCallback.Reacquire()
 {
     _requestBuilderCallback.Reacquire();
 }