ReactiveUI.Primitives.Advanced.DeliveryGate
Serializes deliveries to a downstream observer without holding a lock while the observer runs, so an observer that
blocks on another producer's thread cannot deadlock it.
Gets the wait budget used when none is supplied.
public static void Exit<TDrain>(ref DeliveryGateState gate, TDrain drain) where TDrain : IDrainTarget
Releases a gate taken by an enter, first draining any work handed over meanwhile.
Releases a gate whose direct delivery threw.
public static void Signal<TDrain>(ref DeliveryGateState gate, TDrain drain) where TDrain : IDrainTarget
Drains recorded work with the default wait budget.
public static void Signal<TDrain>(ref DeliveryGateState gate, TDrain drain, TimeSpan waitBudget) where TDrain : IDrainTarget
Drains recorded work on the calling thread, or hands it to the thread already delivering.
Takes the gate on the calling thread when nothing is delivering and no producer is waiting.
Takes the gate like TryEnter, and also succeeds on the thread that is already delivering, so a
nested delivery runs inside the outer one instead of after it.