Code example for AtomicBoolean

Methods: set

     * @see #isCancelled() 
     * @see #onCancelled(Object) 
    public final boolean cancel(boolean mayInterruptIfRunning) {
        return mFuture.cancel(mayInterruptIfRunning);
     * Waits if necessary for the computation to complete, and then 
     * retrieves its result. 
     * @return The computed result. 
     * @throws CancellationException If the computation was cancelled. 
     * @throws ExecutionException If the computation threw an exception. 
     * @throws InterruptedException If the current thread was interrupted 
     *         while waiting. 
Stop searching for code, let great code find you!  Add Codota to your java IDE