beam_mutex (zigler v0.7.3) View Source

general-purpose BEAM mutex wrapped into the zig mutex interface

Link to this section Summary

Functions

initializes the mutex. Note this is failable.

Try to acquire the mutex without blocking. Returns null if the mutex is unavailable. Otherwise returns Held. Call release on Held.

Acquire the mutex. Will deadlock if the mutex is already held by the calling thread.

Link to this section Functions

initializes the mutex. Note this is failable.

Link to this function

tryAcquire(self: *Self) ?Held

View Source

Try to acquire the mutex without blocking. Returns null if the mutex is unavailable. Otherwise returns Held. Call release on Held.

Link to this function

acquire(self: *Dummy) Held

View Source

Acquire the mutex. Will deadlock if the mutex is already held by the calling thread.