10241025102610271028102910301031103210331034
if (mutex == null) { // TODO add a factory if we ever have more than one implementation mutex = new BasicSemaphore(systemKey); } if (mutex != null) { if (mutex.lock() == Semaphore.SM_LOCKED)