Who are the other holders of the _sessionsLock? If _writeSessionsToFile() does IO, they could be waiting for quite a long time.