fix deadlock
This commit is contained in:
parent
26bf6f5e02
commit
38807cc198
@ -12,6 +12,7 @@ public class Program {
|
||||
|
||||
while (true) {
|
||||
stream.ProcessQueues();
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,6 @@ public class SyncQueue<T> {
|
||||
if (Monitor.TryEnter(queue)) {
|
||||
T retval;
|
||||
|
||||
Monitor.Enter(queue);
|
||||
try {
|
||||
queue.TryDequeue(out retval);
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user