Nexus API Reference

Mailbox

Tags
psalm-api
template

T of object

Table of Contents

Methods

close()  : void
Close the mailbox. Subsequent enqueue() calls return EnqueueResult::Dropped without raising. Blocked dequeueBlocking() calls return null once the mailbox drains (closed-and-empty).
count()  : int
dequeue()  : T|null
dequeueBlocking()  : T
enqueue()  : EnqueueResult
isClosed()  : bool
isEmpty()  : bool
isFull()  : bool

Methods

close()

Close the mailbox. Subsequent enqueue() calls return EnqueueResult::Dropped without raising. Blocked dequeueBlocking() calls return null once the mailbox drains (closed-and-empty).

public close() : void

Idempotent — calling close() on an already-closed mailbox is a no-op.

Required by Plan 5 (graceful shutdown). Without close(), the actor's message loop has no way to wake up cleanly when the system stops.

count()

public count() : int
Return values
int

dequeue()

public dequeue() : T|null
Return values
T|null

isClosed()

public isClosed() : bool
Return values
bool

isEmpty()

public isEmpty() : bool
Return values
bool

isFull()

public isFull() : bool
Return values
bool

        
On this page

Search results