Please ignore, should have been tagged as [IO]. Please accept my apologies...
Gary > -----Original Message----- > From: Gary Gregory [mailto:ggreg...@seagullsoftware.com] > Sent: Monday, October 11, 2010 17:00 > To: Commons Developers List > Subject: [POOL] FilesystemMonitor responsiveness > > Hi All: > > Is there any reason why the FilesystemMonitor.run() method is not short- > circuited ASAP? For example, by doing this: > > /** > * Run. > */ > public void run() { > while (running) { > for (FilesystemObserver observer : observers) { > observer.checkAndNotify(); > if (!running) { > return; > } > } > try { > Thread.sleep(interval); > } catch (final InterruptedException ignored) { > } > } > } > > Instead of: > > /** > * Run. > */ > public void run() { > while (running) { > for (FilesystemObserver observer : observers) { > observer.checkAndNotify(); > } > if (!running) { > break; > } > try { > Thread.sleep(interval); > } catch (final InterruptedException ignored) { > } > } > } > > Gary Gregory > Senior Software Engineer > Rocket Software > 3340 Peachtree Road, Suite 820 . Atlanta, GA 30326 . USA > Tel: +1.404.760.1560 > Email: ggreg...@seagullsoftware.com > Web: seagull.rocketsoftware.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org