state property

MailboxState get state

Gets the Mailbox's state which can change concurrently. Once a Mailbox has reached the MailboxState.closed state it can no longer change state.

Implementation

MailboxState get state => _mutex.runLocked(()
  => MailboxState.from(_mailbox.ref.state));