SMutex.tryLocked

Attempt to lock, and if successful, call dg() then unlock.

struct SMutex
shared
bool
tryLocked
(
scope void delegate
()
dg
)

Parameters

dg void delegate
()

A scoped callback that is called only while this is locked.

Return Value

Type: bool

Whether or not the lock was taken.

Meta