shared property

Get a serialized instance that can be passed over to a different isolate.

Implementation

SerializedMutex get shared {
  _shared ??= _SharedMutexServer._withMutex(this);
  return _shared!.serialized;
}