Major breaking change: job interfaces now use JobExecutionContext instead of threadIndex, enabling thread-aware and dynamic job dispatching. Updated all job system, SPMD, and test code to match. Collections improved with new methods and clearer enumerators. Renamed IJobScheduler.WaitComplete to Wait. Incremented project versions. Includes bug fixes, documentation, and style updates.
20 lines
367 B
C#
20 lines
367 B
C#
namespace Misaki.HighPerformance.Jobs;
|
|
|
|
public readonly ref struct JobExecutionContext
|
|
{
|
|
public int ThreadIndex
|
|
{
|
|
get;
|
|
}
|
|
|
|
public IJobScheduler JobScheduler
|
|
{
|
|
get;
|
|
}
|
|
|
|
public JobExecutionContext(int threadIndex, IJobScheduler jobScheduler)
|
|
{
|
|
ThreadIndex = threadIndex;
|
|
JobScheduler = jobScheduler;
|
|
}
|
|
} |