Attempt to lock, and if successful, call dg(&t) for internal value t, then unlock.
A scoped callback that is called only while this is locked.
Whether or not the lock was taken.
See Implementation
Attempt to lock, and if successful, call dg(&t) for internal value t, then unlock.