Update Multiprocessor.cs

pull/1/head
Ogoun 5 years ago
parent b3827ad830
commit dcdb71f121

@ -72,18 +72,28 @@ namespace ZeroLevel.Utils
public void Dispose() public void Dispose()
{ {
_is_disposed = true; _is_disposed = true;
_queue.CompleteAdding(); try
Thread.Yield();
_queue.Dispose();
foreach (var thread in _threads)
{ {
try _queue.CompleteAdding();
_queue.Dispose();
foreach (var thread in _threads)
{ {
thread.Join(); try
thread.Abort(); {
thread.Abort();
}
catch { }
}
foreach (var thread in _threads)
{
try
{
thread.Join();
}
catch { }
} }
catch { }
} }
catch { }
} }
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.