If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation.
"Just remember that a thread of higher priority will always start first."
Senior Software Engineer, IBM
author of: Practical Java
Senior Software Engineer, IBM
author of: Practical Java
Originally posted by Alex Zhang:
But we can hardly say that a higher priority thread must be the one being run prior than the one with low priority.
It all depends on the implementation of the thread scheduler. And it relies on the VM implementation.
Normally speaking U are absolutely correct, but there is no guarantee.
Please have a look here for details:
http://java.sun.com/docs/books/tutorial/essential/threads/priority.html![]()
Senior Software Engineer, IBM
author of: Practical Java
Originally posted by Alex Zhang:
Sorry Peter, just has verbal problem! We actually want to express the same idea, may be I have wrongly caught the meanings of the words!
Pls forgive my rudeness!!! :roll: :roll:
Senior Software Engineer, IBM
author of: Practical Java
Honk if you love justice! And honk twice for tiny ads!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|