i don't understand how this answer is correct....
yield() allows threads with equal priority to take graceful turns... but here threads are not of equal priority so the highest priority thread executes first followed by second highest one....
About Question com.enthuware.ets.scjp.v6.2.218 :
Moderator: admin
-
- Site Admin
- Posts: 10061
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question com.enthuware.ets.scjp.v6.2.218 :
It means that if you have multiple threads with same priority and if one thread calls yield, other threads may get a chance to execute. But if two threads are of different priorities and if the higher priority thread calls yield, the thread with lower priority will not be benefited.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: Google [Bot] and 114 guests