Lock, call dg(), then unlock.
A scoped callback that is called only while this is locked.
See Implementation
Lock, call dg(), then unlock.