mirror of
https://github.com/DCFApixels/DragonECS-ClassicThreads.git
synced 2025-09-18 03:44:34 +08:00
fix
This commit is contained in:
parent
24f352facf
commit
4801a7a40b
@ -21,7 +21,6 @@ namespace DCFApixels.DragonECS
|
||||
record.runWork.WaitOne();
|
||||
record.runWork.Reset();
|
||||
_worker.Invoke(new ReadOnlySpan<int>(_entities, record.start, record.size));
|
||||
|
||||
record.doneWork.Set();
|
||||
}
|
||||
}
|
||||
@ -66,7 +65,7 @@ namespace DCFApixels.DragonECS
|
||||
thread.start = i * spanSize;
|
||||
thread.size = spanSize;
|
||||
}
|
||||
_threads[^1].size = entities.Count % (threadsCount - 1);
|
||||
_threads[threadsCount - 1].size = entities.Count % (threadsCount - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -79,7 +78,7 @@ namespace DCFApixels.DragonECS
|
||||
for (int i = 0; i < threadsCount; i++)
|
||||
{
|
||||
ref var thread = ref _threads[i];
|
||||
thread.runWork.Reset();
|
||||
thread.doneWork.Reset();
|
||||
thread.runWork.Set();
|
||||
}
|
||||
for (int i = 0; i < threadsCount; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user