addCount = 0; try { while (this.isAlive()) { this.interrupt(); this.join(1000);
addCount = 0; try { while (this.isAlive()) { this.interrupt(); this.join(1000);
/** * Destroy the poller. */ @Override public void destroy() { // Close all sockets in the add queue for (int i = 0; i < addCount; i++) { if (comet) { processSocket(addSocket[i], SocketStatus.STOP); } else { destroySocket(addSocket[i]); } } // Close all sockets still in the pollers closePollset(connectionPollset); if (separateKeepAlive) { closePollset(keepAlivePollset); } Pool.destroy(pool); keepAliveCount = 0; addCount = 0; try { while (this.isAlive()) { this.interrupt(); this.join(1000); } } catch (InterruptedException e) { // Ignore } }
/** * Destroy the poller. */ @Override public void destroy() { // Close all sockets in the add queue for (int i = 0; i < addCount; i++) { if (comet) { processSocket(addSocket[i], SocketStatus.STOP); } else { destroySocket(addSocket[i]); } } // Close all sockets still in the poller closePollset(connectionPollset); Pool.destroy(pool); keepAliveCount = 0; addCount = 0; try { while (this.isAlive()) { this.interrupt(); this.join(1000); } } catch (InterruptedException e) { // Ignore } }