synchronized void stop() { stopped = true; notifyAll(); if (statistics != null) { statistics.newPoolSize(0); statistics.write(); } }