mirror of
https://github.com/DCFApixels/DragonECS-ClassicThreads.git
synced 2025-09-17 10:54:35 +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 object _lock = new object();
|
||||
|
||||
private static void ThreadProc(object obj)
|
||||
{
|
||||
int i = (int)obj;
|
||||
@ -116,12 +118,15 @@ namespace DCFApixels.DragonECS
|
||||
_isRunning = false;
|
||||
_worker = _nullWorker;
|
||||
if (_catchedExceptions.Count > 0)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
Exception[] exceptions = _catchedExceptions.ToArray();
|
||||
_catchedExceptions.Clear();
|
||||
_catchedExceptions = new ConcurrentQueue<Exception>();
|
||||
throw new AggregateException(exceptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private struct ThreadReacord
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user