Exemplo n.º 1
0
 /// <summary>
 /// Requests to yield the node.
 /// Thread safe, however Yield cannot be called unless the
 /// last call to Yield or Reaquire was Reaquire.
 /// </summary>
 public void Yield()
 {
     lock (_callbackMonitor)
     {
         IRequestBuilderCallback builderCallback = _requestEntry.Builder as IRequestBuilderCallback;
         ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding.");
         _yieldThreadId = Thread.CurrentThread.ManagedThreadId;
         builderCallback.Yield();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Requests to yield the node.
 /// Thread safe, however Yield cannot be called unless the
 /// last call to Yield or Reacquire was Reacquire.
 /// </summary>
 public void Yield()
 {
     lock (_callbackMonitor)
     {
         IRequestBuilderCallback builderCallback = _requestEntry.Builder as IRequestBuilderCallback;
         ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding.");
         _yieldThreadId = Thread.CurrentThread.ManagedThreadId;
         MSBuildEventSource.Log.ExecuteTaskYieldStart(_taskLoggingContext.TaskName, _taskLoggingContext.BuildEventContext.TaskId);
         builderCallback.Yield();
     }
 }
 /// <summary>
 /// Yields the node.
 /// </summary>
 void IRequestBuilderCallback.Yield()
 {
     _requestBuilderCallback.Yield();
 }