Zum Inhalt springen
Deutsch

PriorityFunction

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

PriorityFunction<T> = (message) => number

Defined in: src/mailbox/PriorityMailbox.ts:23

Priority order for user messages. Lower numeric priority values are dequeued first — 0 is highest priority. Ties are broken by FIFO insertion order.

Runs synchronously inside the sender’s tell, and is not required to be total: a callback that throws, or that answers with something other than a usable number, costs its message the lowest priority and nothing else — see PriorityMailbox.priorityOf for why that is contained here rather than surfaced at the call site, and PriorityMailboxOptionsType.onPriorityError for how to see it happen.

T

T

number