Code example for AtomicBoolean

Methods: set

0
          // just end the background thread 
        } 
      } 
    }); 
     
    isRunning.set(true);
    background.start();
  } 
   
  @Override 
  public void onPause() { 
    isRunning.set(false);
    super.onPause(); 
  } 
}