File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11using System . Diagnostics ;
2+ using Schedulers . Utils ;
23
34namespace Schedulers ;
45
@@ -243,6 +244,16 @@ public void SetDependsOn(JobHandle source)
243244 source . AddDependent ( this ) ;
244245 }
245246
247+ /// <summary>
248+ /// A shortcut to <see cref="JobScheduler.Flush(JobHandle)"/>.
249+ /// Calls the global scheduler wait the job.
250+ /// In case you want to use other scheduler then use <see cref="JobScheduler.Wait(JobHandle)"/> instead.
251+ /// </summary>
252+ public void Wait ( )
253+ {
254+ ParallelForJobCommon . GlobalScheduler ! . Wait ( this ) ;
255+ }
256+
246257 /// <summary>
247258 /// Dependent handles are added to the current <see cref="JobHandle"/> to be executed after it.
248259 /// If the list of dependents is full, it will act as a linked list and create another node to store the additional dependents.
You can’t perform that action at this time.
0 commit comments