comparison test/sematest/TestEditor.java @ 424:1e58479b4170

TestEditor selectionKeys fix.
author one
date Thu, 31 Dec 2009 23:00:55 +0900
parents f8916a96a373
children 622a8e15ff40
comparison
equal deleted inserted replaced
423:0b6b838befeb 424:1e58479b4170
124 channel.register(selector, SelectionKey.OP_READ); 124 channel.register(selector, SelectionKey.OP_READ);
125 this.selector = selector; 125 this.selector = selector;
126 while(running) { 126 while(running) {
127 if (inputLock) { 127 if (inputLock) {
128 // No user input during merge mode (optional) 128 // No user input during merge mode (optional)
129 if (selector.select(0)>0) { 129 selector.select(0);
130 handle(channel.read());
131 }
132 continue;
133 } else if (selector.select(timeout)<=0) { 130 } else if (selector.select(timeout)<=0) {
134 if (syncCounter>0) { 131 if (syncCounter>0) {
135 syncText(); // send the master editor buffer to clients. 132 syncText(); // send the master editor buffer to clients.
136 } 133 }
137 userInput(); 134 userInput();