The OpenD Programming Language

setMaxMailboxSize

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.

  1. void setMaxMailboxSize(Tid tid, size_t messages, OnCrowding doThis)
  2. void setMaxMailboxSize(Tid tid, size_t messages, bool function(Tid) onCrowdingDoThis)
    void
    setMaxMailboxSize
    (,
    size_t messages
    ,
    bool function
    ()
    onCrowdingDoThis
    )

Parameters

tid Tid

The Tid of the thread for which this limit should be set.

messages size_t

The maximum number of messages or zero if no limit.

onCrowdingDoThis bool function
()

The routine called when a message is sent to a full mailbox.

Meta