Function lockObj

Locks a single object.

T lockObj(T) (
  T obj
)
if (isAtomicRefCounted!T);