Table of Contents

Class DispatcherLowPriority

Namespace
Stride.Core.Threading
Assembly
Stride.Core.dll

Built for long-running background jobs, won't monopolize the CPU away from this process or the rest of the user's OS while performing tasks

public static class DispatcherLowPriority
Inheritance
object
DispatcherLowPriority

Remarks

The claim made above cannot be guaranteed for OS outside of Windows, it will spread out the work further to avoid blocking but dense workload may still block. PR to improve support for those platforms are welcome.

Properties

MaxDegreeOfParallelism

Set the amount of threads in the pool

public static int MaxDegreeOfParallelism { get; set; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Value is less than or equal to zero

Methods

ForBatchedAsync(int, ProcessItemRange)

Built for long-running background jobs, won't monopolize the CPU away from this process or the rest of the user's OS while performing tasks

public static Task ForBatchedAsync(int items, DispatcherLowPriority.ProcessItemRange processItemsRange)

Parameters

items int

The amount of items to process

processItemsRange DispatcherLowPriority.ProcessItemRange

The method running in parallel

Returns

Task

A task to await for completion

Remarks

The claim made above cannot be guaranteed for OS outside of Windows, it will spread out the work further to avoid blocking but dense workload may still block. PR to improve support for those platforms are welcome.