12345module juptune.event.loop.mutex;
Result lock(
);
Acquires the mutex's lock, yielding the current fiber until the lock has been acquired if needed.
Since this integrates with Juptune's event loop, if the fiber is yielded it won't have another chance to run until the next tick of the event loop.
MutexError.mutexTornDownsometimes if this mutex's dtor was somehow called while we're waiting to acquire its lock (not 100% reliable failsafe to prevent stuck fibers).
Anything that juptuneEventLoopSubmitEventcan.
An errorful Resultif something went wrong.