Function Lock.owner

Returns the FiberHandle of the current owner of the lock.

FiberHandle owner () pure nothrow @property @nogc @safe const;

Function returns FiberHandle.init if not currently locked. This is not the same as calling isLocked. There are some cases where isLocked will return true but owner will return the invalid handle.