Code example for Semaphore

Methods: acquireUninterruptibly

0
		if (DEBUG) {
			Log.d(TAG, "pre surfaceCreated()...");
		} 
 
		renderRunnable = new RenderRunnable();
		renderThreadStartSemaphore = new Semaphore(0);
		renderThreadDestroySemaphore = new Semaphore(0);
		surfaceReadySemaphore = new Semaphore(0);
		glInitializeSemaphore = new Semaphore(0);
 
		// Start thread and wait until it starts 
		new Thread(renderRunnable, "GL_Thread").start();
		renderThreadStartSemaphore.acquireUninterruptibly();
 
		if (DEBUG) {
			Log.d(TAG, "post surfaceCreated()");
		} 
	} 
 
	public void surfaceDestroyed(SurfaceHolder holder) {
		if (DEBUG) {