Files
Misaki.HighPerformance/Misaki.HighPerformance.Jobs
Misaki abb0cd88ea feat(core): improve memory management and API safety
- JobScheduler now explicitly frees unmanaged memory in _jobInfoPool before disposal.
- Removed the unused TempJobAllocator struct and implementation.
- Refactored AllocationManager to use conditional compilation for safety checks, making MemoryHandle usage conditional.
- Improved documentation in AllocationManager for clarity on allocation size and safety check behavior.
- Added UnsafeSetCount method to UnsafeList<T> for direct count manipulation with validation.
- Bumped AssemblyVersion in Jobs and LowLevel projects.
2026-03-31 19:58:47 +09:00
..
2026-03-08 15:57:05 +09:00
2026-03-08 15:57:05 +09:00
2026-03-08 15:57:05 +09:00
2026-03-08 15:57:05 +09:00
2026-03-08 15:57:05 +09:00
2026-03-30 12:47:29 +09:00

Misaki.HighPerformance.Jobs

A zero-allocation-oriented job system for C#.

This package provides job contracts, scheduling, worker threads, dependency handling, and temporary allocation support for high-throughput work execution.

What it includes

  • single-job execution
  • parallel-for job execution
  • parallel range jobs
  • job handles and dependency tracking
  • worker thread management
  • temporary job allocation support

Highlights

  • designed to minimize allocations during scheduling and execution
  • supports dependency composition and wait operations
  • suitable for frame-based engines, simulations, batch processing, and custom runtimes
  • integrates with the low-level allocation layer

Main types

  • IJob
  • IJobParallelFor
  • IJobParallel
  • JobScheduler
  • JobHandle
  • JobExecutionContext
  • JobState
  • WorkerThread
  • TempJobAllocator

Example

using Misaki.HighPerformance.Jobs;

public struct AddJob : IJob
{
    public int* pA;
    public int* pB;
    public int* pResult;

    public void Execute(ref readonly JobExecutionContext ctx)
    {
        *pResult = *pA + *pB;
    }
}

int a = 5;
int b = 10;
int result = 0;

var job = new AddJob
{
    pA = &a,
    pB = &b,
    pResult = &result
};

JobHandle handle = jobScheduler.Schedule(job);
jobScheduler.Wait(handle);

Package reference

dotnet add package Misaki.HighPerformance.Jobs

Notes

This project targets net10.0, enables unsafe code, and is packaged as content files for downstream consumption.