Enhance JobScheduler and related classes
Added XML documentation comments to the `JobScheduler` class and its methods. Added a new method `GetJobStatus` in the `JobScheduler` class for job status retrieval. Added a new `CollectionHandle` struct for collection management. Added a new test class `TestUnsafeSparseSet` with unit tests for `UnsafeSparseSet`. Changed the `WorkerThread` class to improve job retrieval logic with a new `FindJob` method. Changed the `DynamicArena` class by removing commented-out code to streamline memory management. Removed commented-out code in the `WorkerThread` class for improved readability. Removed the `ArenaAllocator` struct from `AllocationManager` to clean up unused code. Removed the `ParallelWriter` struct from `UnsafeSparseSet`, indicating a shift in handling sparse sets.
This commit is contained in:
@@ -90,22 +90,6 @@ public unsafe struct DynamicArena : IDisposable
|
||||
// Release the spinlock
|
||||
Interlocked.Exchange(ref _nodeCreationLock, 0);
|
||||
}
|
||||
|
||||
//var newNode = (ArenaNode*)Malloc(SizeOf<ArenaNode>());
|
||||
//try
|
||||
//{
|
||||
// newNode->arena = new Arena(size);
|
||||
// newNode->next = null;
|
||||
|
||||
// _current->next = newNode;
|
||||
// _current = newNode;
|
||||
// return true;
|
||||
//}
|
||||
//catch
|
||||
//{
|
||||
// Free(newNode);
|
||||
// return false;
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -162,9 +146,6 @@ public unsafe struct DynamicArena : IDisposable
|
||||
_current = _root;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disposes all arenas and frees associated memory.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
if (_root == null)
|
||||
|
||||
Reference in New Issue
Block a user