code: public void process() throws InterruptedException {
  
  		boolean alreadyInSync = Thread.currentThread() instanceof WebcamProcessor.ProcessorThread;
  
  		if (alreadyInSync) {
  			handle();
  		} else {
  			if (doSync) {
  				if (processor == null) {
  					throw new RuntimeException("Driver should be synchronized, but processor is null");
  				}
  				processor.process(this);
  			} else {
  				handle();
  			}
  		}
  	}
docs: Process task by processor thread.
  
  @throws InterruptedException when thread has been interrupted