- Removed IJobScheduler interface; merged logic into JobScheduler - Changed scheduling APIs to accept multiple dependencies (ReadOnlySpan) - Moved WaitItem classes to JobScheduler.cs and updated types - Updated JobExecutionContext to use JobScheduler and added docs - Renamed AllocationManagerInitOpts to AllocationManagerDesc (required props) - Added thread-safe TotalAllocatedMemory property to AllocationManager - Refactored Integer to Data in benchmarks; updated usage - Updated tests and improved documentation throughout
36 lines
747 B
C#
36 lines
747 B
C#
namespace Misaki.HighPerformance.Jobs;
|
|
|
|
public readonly ref struct JobExecutionContext
|
|
{
|
|
/// <summary>
|
|
/// Gets the index of the current thread executing the job.
|
|
/// </summary>
|
|
public int ThreadIndex
|
|
{
|
|
get; init;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the job scheduler that is responsible for managing the execution of jobs.
|
|
/// </summary>
|
|
public JobScheduler JobScheduler
|
|
{
|
|
get; init;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the state object for the job scheduler.
|
|
/// </summary>
|
|
public object? State
|
|
{
|
|
get; init;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the handle for the currently executing job.
|
|
/// </summary>
|
|
public JobHandle SelfHandle
|
|
{
|
|
get; init;
|
|
}
|
|
} |