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

EventLoopScheduler

Represents an object that schedules units of work on a designated thread.

Creates an object that schedules units of work on a designated thread.

public EventLoopScheduler(Func<ThreadStart, Thread> threadFactory)

Creates an object that schedules units of work on a designated thread, using the specified factory to control thread creation options.

public void Dispose()

Ends the thread associated with this scheduler. All remaining work in the scheduler queue is abandoned.

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

Schedules a periodic piece of work on the designated thread.