Marmos
v juptune
v asn1
v lang
v ast
v Classes
v Enums
v ir
v parser
v Enums
v Structs
v core
v crypto
v keyexchange
v memory
v data
v alphabet
v buffer
v json
v builder
v parser
v Enums
v Structs
v serialise
v Structs
v Templates
v pem
v Enums
v Structs

Functions Mutex.lock

1
2
3
4
5

Documentation

Acquires the mutex's lock, yielding the current fiber until the lock has been acquired if needed.

Notes

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.

Throws

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.

Returns

An errorful Resultif something went wrong.