|
After learning the way thread scheduler work, one thing is sure that you cannot control it. For instance, you cannot tell which thread to run from the thread pool. However, you can influence the scheduler’s decision. There are few methods in java.lang.Thread class and some methods that a thread inherits from java.lang.Object class which can be used to influence the thread scheduler to pick (or not to pick) a thread for execution.