Acquire a thread lock for serializing access to the underlying I/O.
logging/Handler.createLock
Handler.createLock