setMaxMailboxSize

fnvoid setMaxMailboxSize(Tid tid, size_t messages, OnCrowding doThis) @safe pure

Sets a maximum mailbox size.

Sets a limit on the maximum number of user messages allowed in the mailbox. If this limit is reached, the caller attempting to add a new message will execute the behavior specified by doThis. If messages is zero, the mailbox is unbounded.

Parameters

tidThe Tid of the thread for which this limit should be set.
messagesThe maximum number of messages or zero if no limit.
doThisThe behavior executed when a message is sent to a full mailbox.
fnvoid setMaxMailboxSize(Tid tid, size_t messages, bool function(Tid) onCrowdingDoThis)

Sets a maximum mailbox size.

Sets a limit on the maximum number of user messages allowed in the mailbox. If this limit is reached, the caller attempting to add a new message will execute onCrowdingDoThis. If messages is zero, the mailbox is unbounded.

Parameters

tidThe Tid of the thread for which this limit should be set.
messagesThe maximum number of messages or zero if no limit.
onCrowdingDoThisThe routine called when a message is sent to a full mailbox.