View source code
Display the source code in std/concurrency.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
std.concurrency.set_max_mailbox_size
- multiple declarations
- Function setMaxMailboxSize
- Function setMaxMailboxSize
Function 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 the behavior specified by doThis
. If messages
is zero, the mailbox
is unbounded.
Prototype
void setMaxMailboxSize( Tid tid, ulong messages, OnCrowding doThis );
Parameters
Name | Description |
---|---|
tid | The Tid of the thread for which this limit should be set. |
messages | The maximum number of messages or zero if no limit. |
doThis | The behavior executed when a message is sent to a full mailbox. |
Function 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.
Prototype
void setMaxMailboxSize( Tid tid, ulong messages, bool function(Tid) onCrowdingDoThis );
Parameters
Name | Description |
---|---|
tid | The Tid of the thread for which this limit should be set. |
messages | The maximum number of messages or zero if no limit. |
onCrowdingDoThis | The routine called when a message is sent to a full mailbox. |
Authors
Sean Kelly, Alex Rønne Petersen, Martin Nowak