mirror of
https://github.com/DCFApixels/DragonECS-ClassicThreads.git
synced 2025-09-17 19:24:37 +08:00
fixes for support Unity 2020.1.x
This commit is contained in:
parent
908b6328cd
commit
db29061ccb
@ -18,6 +18,8 @@ namespace DCFApixels.DragonECS
|
|||||||
|
|
||||||
private static bool _isRunning = false;
|
private static bool _isRunning = false;
|
||||||
|
|
||||||
|
private static object _lock = new object();
|
||||||
|
|
||||||
private static void ThreadProc(object obj)
|
private static void ThreadProc(object obj)
|
||||||
{
|
{
|
||||||
int i = (int)obj;
|
int i = (int)obj;
|
||||||
@ -117,9 +119,12 @@ namespace DCFApixels.DragonECS
|
|||||||
_worker = _nullWorker;
|
_worker = _nullWorker;
|
||||||
if (_catchedExceptions.Count > 0)
|
if (_catchedExceptions.Count > 0)
|
||||||
{
|
{
|
||||||
Exception[] exceptions = _catchedExceptions.ToArray();
|
lock (_lock)
|
||||||
_catchedExceptions.Clear();
|
{
|
||||||
throw new AggregateException(exceptions);
|
Exception[] exceptions = _catchedExceptions.ToArray();
|
||||||
|
_catchedExceptions = new ConcurrentQueue<Exception>();
|
||||||
|
throw new AggregateException(exceptions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user