Ejemplo n.º 1
0
 private void terminateThreads() {
   if (loadThumbsRunnable != null && loadThumbsRunnable.isRunning()) {
     loadThumbsRunnable.terminate();
     try {
       loadThumbsThread.join();
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
   if (searchThread != null) {
     searchRunnable.terminate();
     // No need to join, since we don't really terminate the thread. We just demand
     // it to post its result runnable into the gui main loop.
   }
 }