0
Java- Thread setPriority does not ensure order of execution right?
I was doing a java practice about Threads in Java, where you had to reverse the order of two instances of an extended Thread class. You had to .setPriority() to get the reverse order but it didn't work.
2 Antworten
+ 5
What Sololearn's compiler does and the way things act in the real world are different some times.
As per that other forum thread, there are circumstances that also come into play.
+ 3
Right, there is no guarantee. We discussed it here a bit:
https://www.sololearn.com/discuss/3206427