Code example for ScheduledThreadPoolExecutor

Methods: shutdownNow

0
      }, mVideoInterval / 2, mVideoInterval, TimeUnit.SECONDS); 
    } 
  } 
 
  public void stop() { 
    if(mSTPE != null) mSTPE.shutdownNow();
    if(mCamera != null) mCamera.release();
    Log.i(TAG, "Cameraman stopped");
  } 
 
  public void photo() { 
    try { 
      if(mCamera == null) {
        Log.i(TAG, "photo(): mCamera is null");
        return; 
      } 
 
      Log.i(TAG, "photo() acquiring camera...");
      mCameraSemaphore.acquire();
      Log.i(TAG, "photo() acquired camera");
Stop searching for code, let great code find you!  Add Codota to your java IDE