• Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread - yield()

 
R Sawant
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

When we call yield() method on the currently executing thread can a thread with priority <= priority of the current thread starts executing.
How much it is platform dependent ?

Thanks
Ramdas.
 
Henry Wong
author
Sheriff
Posts: 22531
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramdas Sawant:

When we call yield() method on the currently executing thread can a thread with priority <= priority of the current thread starts executing.
How much it is platform dependent ?


It's completely platform dependent. The priority of a thread is merely a hint to the operating systems. This is true whether you call yield() or not.

Henry
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yield is just as much a hint.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!