Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/channel/SelectorSimulator.java @ 430:03ab374605a6
Test program termination.
author | one |
---|---|
date | Sat, 02 Jan 2010 04:16:25 +0900 |
parents | b8efd57faf78 |
children |
line wrap: on
line diff
--- a/rep/channel/SelectorSimulator.java Sat Jan 02 03:28:26 2010 +0900 +++ b/rep/channel/SelectorSimulator.java Sat Jan 02 04:16:25 2010 +0900 @@ -24,18 +24,15 @@ } public int select() throws IOException { - while(true) { - getSelectedKeys(); - if(selectedKeys.isEmpty()) { - try { - synchronized(this) { - wait(); - } - } catch (InterruptedException e) { - throw new IOException(); + getSelectedKeys(); + if(selectedKeys.isEmpty()) { + try { + synchronized(this) { + wait(); } - } else - break; + } catch (InterruptedException e) { + throw new IOException(); + } } return selectedKeys.size(); }