コード例 #1
0
  public void handleBlock(Thread thread) {

    try {
      if (socket != null) {
        logger.debug("close socket()");
        socket.close();
      }
    } catch (Exception e) {
      // ignored
    }
    synchronized (this) {
      if (thread != null) {
        logger.debug("interrupt thread()");
        thread.interrupt();
      }
    }
  }
コード例 #2
0
 public void stopThread() {
   runit = false;
   fetchDataThread.interrupt();
   System.out.println("DataVideoGather: Stopped thread.");
 }