{"repo":"genaray/ZeroAllocJobScheduler","free":true,"listed":false,"github":"https://github.com/genaray/ZeroAllocJobScheduler","clone":"git clone https://github.com/genaray/ZeroAllocJobScheduler.git","description":"A high-performance alloc free c# Jobscheduler.","language":"C#","stars":206,"topics":["csharp","ecs","engine","game","game-development","gamedev","jobs","multithreading","net6","net7"],"license":"Apache-2.0","category":"game-templates","readme_excerpt":"ZeroAllocJobScheduler A high-performance alloc-free C# job scheduler. Schedules and executes jobs on a set of worker threads with automatic pooling of internal handles. Usage Dependencies To set a sequential dependency on a job, simply pass a created JobHandle to JobScheduler.Schedule(job, dependency) . Multiple dependencies Use Scheduler.CombineDependencies(JobHandle[] handles) to get a new handle that depends on the handles in parallel. That handle can then be passed into future Schedule call as a dependency itself! Bulk complete Rather than using CombineDependencies() , if you just need to block the main thread until a list of handles are complete, you can use this syntax: Or, if you don't want to maintain a list or array, you can just call handle.Complete() on all your handles, in any order. Parallel-For support Instead of IJob , you may extend your class from IJobParallelFor to implement foreach-style indexing on a job. This is useful for when you have very many small operations, and it would be inefficient to schedule a whole job for each one; for example, iterating through a giant set of data. Define an IJobParallelFor like so: Run your IJobParallelFor with this syntax: However, there are several caveats: Don't overuse IJobParallelFor . In general, over-parallelization is a bad thing. Only schedule your job in parallel if it is truly iterating a huge amount of times, and make sure to always profile when dealing with multithreaded code. You must choose a sane BatchSize ","default_branch":null,"files":null,"tree":[],"storefront":"/r/genaray","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/genaray/ZeroAllocJobScheduler/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}