Please sign in to comment.
[JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for…
… Selector in Windows. (#221) * [JENKINS-47965, JENKINS-38696] - IOHub should not wait infinitely for Selector in Windows. Windows implementation of NIO Channel Selector does not request "Select now" in https://github.com/jenkinsci/remoting/blob/6165d6fb6a71a7f4fce52ce5fc4cac479052ce04/src/main/java/org/jenkinsci/remoting/protocol/IOHub.java#L436 and hence calls selector#select()... and this method has no timeout. When the code gets into this branch, Selector will be waiting infinitely without calling selector#isOpen(). Such implementation relies on the Selector implementation, which shout interrupt the select() wait if the selector is being closed. But apparently it does not no my machine (Win 10, amd64, Oracle JDK 8u131) This change adds wait timeout and makes the IOHub implementation to loop in the logic. * [JENKINS-47965] - Lame implementation of IOHub Selector wakeup thread for Windows * [JENKINS-47965] - Polish the implementation * [JENKINS-38696] - Add Windows back to CI and make @jtnord happy * [JENKINS-47965] - Simplify the logic * [JENKINS-47965] - Replace Thread.sleep() by object wait()/notify() * [JENKINS-47965] - Cleanup the locking logic * [JENKINS-47965] - Address comments from @jtnord, run Selector Watcher in Unix systems as well
- Loading branch information
Showing with 73 additions and 6 deletions.