Table of Contents

Method ListenAsync

Namespace
Millrace.Storage.PostgreSql
Assembly
Millrace.Storage.PostgreSql.dll

ListenAsync(IReadOnlySet<string>, CancellationToken)

Streams wakeup hints for queues until cancelled.

public IAsyncEnumerable<QueueSignal> ListenAsync(IReadOnlySet<string> queues, CancellationToken ct)

Parameters

queues IReadOnlySet<string>
ct CancellationToken

Returns

IAsyncEnumerable<QueueSignal>

Remarks

A latency optimisation and nothing more. Signals may be dropped, duplicated, or arrive for a queue with nothing claimable — a worker treats each as "look now", never as "there is work". A provider whose channel drops every signal is still correct; its workers just fall back to the poll interval.