Code example for Semaphore

Methods: drainPermits

0
    	 
    	clearText(); 
    	displayText("Starting benchmark...\n"); 
    	displayText("Please don't interact with your device till it's done, it might affect results\n\n"); 
    	 
    	benchPhase.drainPermits();
    	new BenchmarkTask(this, cr).execute();
 
    }     
     
     
     
     
     
    /** 
     * Method for test button 
     * @param view ignored 
     */ 
    public void testConflicts(View view) {
    	if (operationInProgress != 0) return;
    	operationInProgress = 2;