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

@@ -392,5 +392,16 @@ public static unsafe partial class MemoryUtility
{
return Marshal.SizeOf<AlignOfHelper<T>>() - Marshal.SizeOf<T>();
}
public static nuint AlignUp(nuint value, nuint alignment)
{
if (alignment == 0)
{
throw new ArgumentException("Alignment must be greater than zero.", nameof(alignment));
}
var mask = alignment - 1;
return (value + mask) & ~mask;
}
}