ReactiveUI.Primitives.Concurrency.WasmSequencer
Task-pool replacement for single-threaded event-loop runtimes such as browser WebAssembly: it never starts
threads and never blocks. Immediate work is batched one drain per event-loop turn through a zero-due timer
(a setTimeout(0) macrotask on WebAssembly, so the browser can render between batches); delayed work
uses the shared timer, which the WebAssembly runtime backs with the JS event loop.
namespace ReactiveUI.Primitives.Concurrency
{
public sealed class WasmSequencer : ISequencer, IDisposable
{
public static WasmSequencer Default { get; }
public DateTimeOffset Now { get; }
public long Timestamp { get; }
public void Schedule(IWorkItem item);
public void Schedule(IWorkItem item, long dueTimestamp);
public void Dispose();
}
}