Mailbox constructor

Mailbox()

Implementation

Mailbox()
    : _mailbox = calloc<_MailboxRepr>(),
      _mutex = Mutex(),
      _condVar = ConditionVariable() {
  _mailbox.ref
    ..open = _stateOpen
    ..count = 0
    ..buffer = nullptr
    ..bufferLength = 0
    ..magic = _magic; // canary for memory corruption detection
  finalizer.attach(this, _mailbox);
}