Job system priorities, async waits, parallel map/queue

Major refactor:
- Add job priority tiers and async wait APIs to IJobScheduler
- Implement priority-based job queues and scheduling logic
- Introduce UnsafeParallelHashMap and refactor UnsafeParallelQueue
- Refactor UnsafeSlotMap to chunked storage for scalability
- Update SlotMap/ConcurrentSlotMap for consistency and perf
- Add new benchmarks and unit tests for parallel collections
- Misc: add MemoryUtility.AlignUp, version bumps, test improvements, bug fixes
This commit is contained in:
2026-04-18 11:26:08 +09:00
parent d5616daa05
commit 13802ca6c8
22 changed files with 1459 additions and 267 deletions

View File

@@ -15,7 +15,7 @@ public class TestUnsafeChunkedQueue
[TestMethod]
public void BasicEnqueueDequeueTest()
{
using var queue = new UnsafeChunkedQueue<int>(32, AllocationHandle.Persistent);
using var queue = new UnsafeParallelQueue<int>(32, AllocationHandle.Persistent);
Assert.IsTrue(queue.IsCreated);
@@ -35,7 +35,7 @@ public class TestUnsafeChunkedQueue
public void ChunkExpansionTest()
{
// Force chunk expansions by enqueuing more than the chunk capacity
using var queue = new UnsafeChunkedQueue<int>(16, AllocationHandle.Persistent);
using var queue = new UnsafeParallelQueue<int>(16, AllocationHandle.Persistent);
var totalItems = 100;
@@ -57,7 +57,7 @@ public class TestUnsafeChunkedQueue
public void ConcurrentEnqueueDequeueTest()
{
// Multi-threaded stress test to verify lock-free safety and chunk caching
using var queue = new UnsafeChunkedQueue<int>(64, AllocationHandle.Persistent);
using var queue = new UnsafeParallelQueue<int>(64, AllocationHandle.Persistent);
var totalElements = 100_000;
var enqueueTask = Task.Run(() =>