Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mailbox ¶
type Mailbox interface { // Enqueue places a new message to the Mailbox. If Mailbox is full // method returns errors.MailboxFull. Mailboxes are unbounded unless // SetLimit was called with a value of `limit` > 0. Enqueue(message actor.Message) error // Enqueue places a new message in the front of the messages queue. The // message will be Dequeued before any messages placed using Enqueue. EnqueueFront(message actor.Message) error // Dequeue gets a next message from the Mailbox. If Mailbox is empty, // Dequeue blocks until someone places a message to the Mailbox. There // should be only one goroutine that uses this method. Dequeue() actor.Message // Stash places a message to the separate queue of delayed messages. // This method should be called from the same single goroutine that calls Dequeue. Stash(message actor.Message) // Unstash places all previously Stash'ed messages in the front of the message queue. // The original order of Stash'ed messages is preserved. This method should be called // from the same single goroutine that calls Dequeue. Unstash() // SetLimit sets the maximum capacity of the Mailbox. This limit doesn't affect // stashed and priority messages - the amount of these messages is always unlimited. SetLimit(limit int) }
Mailbox is a queue of messages sent to a given actor.
Click to show internal directories.
Click to hide internal directories.