I've been having the problem that a Java program I can't change is running a lot slower than necessary as that it waits using a Thread.sleep() at a certain point. I've been looking for some way to make this Thread.sleep() return early using some sort of external program. So far I found this question about the implementation(look at the OpenJVM implementation shown in the accepted answer). So I am now asking myself if I can somehow make the OS(Linux, in my case) get back to the thread an resume it sooner than intended.
Asked
Active
Viewed 148 times
0
-
1In short: you would be better off rethinking the problem and the solution. Thread scheduling belongs to the OS not the JVM. – bichito Jul 24 '17 at 14:14
-
1The problem is that you can't change the Java program. That's the problem you should address. – Erwin Bolwidt Jul 24 '17 at 14:15
-
@efekctive yes, but that is what I am looking for. I just want to know if there is a way to make the OS do that. – JeWe37 Jul 24 '17 at 14:27
-
Just my opinion: find another way. – bichito Jul 24 '17 at 14:30