Initializes a thread lock which can be used to serialize access to underlying I/O functionality which may not be threadsafe.
createLock()