Skip to content
Permalink
Browse files
[JENKINS-36871] WIndows!?!
  • Loading branch information
stephenc committed Aug 5, 2016
1 parent d942165 commit 4b291b3ab370e1ddee8b656c96cef636a86c6573
Showing 1 changed file with 6 additions and 7 deletions.
@@ -404,20 +404,19 @@ public final void run() {
try {
while (isOpen()) {
selectorThread.setName(
String.format("IOHub#%d: Selector[keys:%d, gen:%d] / %s",
_id,
selector.keys().size(),
gen,
oldName)
"IOHub#" + _id + ": Selector[keys:" + selector.keys().size() + ", gen:" + gen + "] / " + oldName
);
try {
processScheduledTasks();
if (processRegistrations() || processInterestOps() || processSelectorTasks()) {
boolean wantSelectNow = processRegistrations();
wantSelectNow = processInterestOps() || wantSelectNow;
wantSelectNow = processSelectorTasks() || wantSelectNow;
if (wantSelectNow) {
// we did some work that is anticipated to either take some time or have likely resulted
// in an immediately ready selection key, hence we use the non-blocking form
selector.selectNow();
} else {
selector.select(1000);
selector.select(); // WINDOWS!!! Waiting the whole timeout anyway if timeout specified?!?
}
Set<SelectionKey> keys = selector.selectedKeys();
if (keys.isEmpty()) {

0 comments on commit 4b291b3

Please sign in to comment.