Selector stuck sometimes in the ePoolWait when called with the timeout
Description
We noticed that for some reason calling Selector with the give timeout is not working out, as the thread gets stuck in the native ePoolWait method. I created a small fix for this where the Selector is called only with the non-blocking selectNow() method and handling the timeout thingy on our own in the java code.
This already gave create results on the IBM JVM that was experiencing the problem (but I think in general many Java 7 versions have this problem, it's also easy to find this on the Google).
I tested with the KryoNet integration test it seams to have same performance as before and that it's also functionally OK.
The fix we introduced here is having a huge impact to the performance of the sending apparently. Before this fix I needed app. 30s to start Ddv Store app. With same settings now I need app. 50s to start. That's almost 100% drop. I am not sure what can we do, but seams like this was not the best fix. I'll try to investigate what can we do.
We noticed that for some reason calling Selector with the give timeout is not working out, as the thread gets stuck in the native ePoolWait method. I created a small fix for this where the Selector is called only with the non-blocking selectNow() method and handling the timeout thingy on our own in the java code.
This already gave create results on the IBM JVM that was experiencing the problem (but I think in general many Java 7 versions have this problem, it's also easy to find this on the Google).
I tested with the KryoNet integration test it seams to have same performance as before and that it's also functionally OK.