Mercurial > hg > FederatedLinda
comparison src/fdl/FDLindaServ.java @ 92:ea4ee892baf5
commit
author | kazz <kazz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 22 Apr 2010 16:13:03 +0900 |
parents | 82a292aa41ad |
children | 96c63bc659d4 |
comparison
equal
deleted
inserted
replaced
91:4df1d50df52a | 92:ea4ee892baf5 |
---|---|
90 // this does not work because #it.remove() is not called. | 90 // this does not work because #it.remove() is not called. |
91 // for(SelectionKey s:selector.selectedKeys()) { | 91 // for(SelectionKey s:selector.selectedKeys()) { |
92 // TupleHandler handler = (TupleHandler)s.attachment(); | 92 // TupleHandler handler = (TupleHandler)s.attachment(); |
93 // handler.handle(s); | 93 // handler.handle(s); |
94 // } | 94 // } |
95 for (Iterator<SelectionKey> it = selector.selectedKeys().iterator();it.hasNext(); ) { | 95 for (Iterator<SelectionKey> it = selector.selectedKeys().iterator();it.hasNext(); ) { |
96 SelectionKey s = it.next(); | 96 SelectionKey s = it.next(); |
97 it.remove(); | 97 it.remove(); |
98 TupleHandler handler = (TupleHandler)s.attachment(); | 98 TupleHandler handler = (TupleHandler)s.attachment(); |
99 handler.handle(s); | 99 handler.handle(s); |
100 } | 100 } |