<PackageReference Include="System.Reactive" Version="4.1.2" />

TaskPoolScheduler

Represents an object that schedules units of work on the Task Parallel Library (TPL) task pool.
public static TaskPoolScheduler Default { get; }

Gets an instance of this scheduler that uses the default TaskScheduler.

public TaskPoolScheduler(TaskFactory taskFactory)

Creates an object that schedules units of work using the provided TaskFactory.

public IDisposable ScheduleLongRunning<TState>(TState state, Action<TState, ICancelable> action)

Schedules a long-running task by creating a new task using TaskCreationOptions.LongRunning. Cancellation happens through polling.

public IDisposable SchedulePeriodic<TState>(TState state, TimeSpan period, Func<TState, TState> action)

Schedules a periodic piece of work by running a platform-specific timer to create tasks periodically.