Code example for AtomicBoolean

Methods: compareAndSet

0
        ttsLatch.countDown();
    } 
 
    /** Shuts down the TTS engine. */ 
    public void shutdown() { 
        if (isShutdown.compareAndSet(false, true)) {
            tts.shutdown();
        } 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE