Exemplo n.º 1
0
 public void killThread() {
   boolean retry = true;
   gthread.setRunning(false);
   while (retry) {
     try {
       gthread.join();
       retry = false;
     } catch (InterruptedException e) {
     }
   }
 }
Exemplo n.º 2
0
 /*
  * Callback invoked when the Surface has been destroyed.
  */
 public void surfaceDestroyed(SurfaceHolder holder) {
   boolean retry = true;
   thread.setRunning(false);
   while (retry) {
     try {
       thread.join();
       retry = false;
     } catch (InterruptedException e) {
       Log.e("Tile Game Example", e.getMessage());
     }
   }
 }
Exemplo n.º 3
0
 public void surfaceDestroyed(SurfaceHolder holder) {
   if (thread != null) {
     boolean retry = true;
     thread.setRunning(false);
     while (retry) {
       try {
         thread.join();
         retry = false;
       } catch (InterruptedException e) {
       }
     }
   }
   thread = null;
 }
Exemplo n.º 4
0
 public void surfaceDestroyed(SurfaceHolder holder) {
   // Destroy the thread
   if (myThread.isAlive()) {
     myThread.startRun(false);
   }
   boolean retry = true;
   while (retry) {
     try {
       myThread.join();
       retry = false;
     } catch (InterruptedException e) {
     }
   }
 }