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(); } } }
public void stopThread() { runit = false; fetchDataThread.interrupt(); System.out.println("DataVideoGather: Stopped thread."); }