Skip to content

Commit

Permalink
Merge pull request #924 from AArnott/fix906
Browse files Browse the repository at this point in the history
Avoid internal exception on timeout of AsyncSemaphore request that races with disposal
  • Loading branch information
AArnott authored Sep 28, 2021
2 parents 4885b8f + b8115c6 commit 9708b8b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Microsoft.VisualStudio.Threading/AsyncSemaphore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ protected virtual void Dispose(bool disposing)
head.Value.Trigger.TrySetException(new ObjectDisposedException(this.GetType().FullName));
waitersCopy.Add(head.Value);
this.waiters.RemoveFirst();
head.Value.Node = null;
}
}

Expand Down

0 comments on commit 9708b8b

Please sign in to comment.