boolean (long waitMillis) { try { mySemaphore.tryAcquire(waitMillis, TimeUnit.MILLISECONDS); } catch (InterruptedException ignore) { } return !myResultRef.compareAndSet(INITIAL_STATE, SLOW_OPERATION_STATE); }