Skip to content

Commit 3fab45c

Browse files
committed
Fix parallel for jobs not being parallel
1 parent d166a37 commit 3fab45c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

JobScheduler/Utils/ParallelForJob.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static ParallelForHandle Create(int start, int count, Action<int> action,
2525
{
2626
scheduler ??= ParallelForJobCommon.GlobalScheduler ?? throw new ArgumentNullException(nameof(scheduler), "JobScheduler cannot be null. Please initialize it before using ParallelForJob.");
2727
var producer = new ParallelJobProducer<JobProducer>(start, count, new(action), scheduler);
28+
producer.CheckAndSplit();
2829
return new(producer.GetHandle(), scheduler);
2930
}
3031

0 commit comments

Comments
 (0)