This fixes a race condition where if the runner takes to long to execute and we get two messages before the runner quits, we hit a blocking piece of code when trying to add new messages to the queue, which leads to a deadlock, where we need to finish the runner to process new messages but the runner won't quit because it is waiting for us to accept is other messages.
This commit is contained in:
parent
771f4ed163
commit
db218ab11c
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ namespace Microsoft.DotNet.Tools.Test
|
|||
|
||||
public TestMessagesCollection()
|
||||
{
|
||||
_readQueue = new BlockingCollection<Message>(boundedCapacity: 1);
|
||||
_readQueue = new BlockingCollection<Message>();
|
||||
_terminateWaitHandle = new ManualResetEventSlim();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue