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

NewThreadScheduler

Represents an object that schedules each unit of work on a separate thread.
public static NewThreadScheduler Default { get; }

Gets an instance of this scheduler that uses the default Thread constructor.

Creates an object that schedules each unit of work on a separate thread.

public NewThreadScheduler(Func<ThreadStart, Thread> threadFactory)

Creates an object that schedules each unit of work on a separate thread.

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

Schedules a long-running task by creating a new thread. Cancellation happens through polling.

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

Schedules a periodic piece of work by creating a new thread that goes to sleep when work has been dispatched and wakes up again at the next periodic due time.