Jump to content

Talk:Yield method

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Yield (multithreading)

[edit]

I think a more general concept of 'yield (multithreading)' (I'd found this after creating that link in text elsewhere) makes sense. Perhaps it could be worked into the multithreading article e.g. Yield#multithreading, or this article could be rename and generalised. The latter makes sense since a yield *functions* are lower level concepts. the article could then link better to coroutines which also provide yield control

Described Behavior Seems Incorrect

[edit]

Per Effective Java item 72, "It is within specification for Thread.yield to do nothing at all, simply returning control to its caller. Some modern VMs actually do this ... do not rely on Thread.yield or thread priorities. These facilities are merely hints to the scheduler."

I think the reference to implementing Thread.yield as a no-op is outdated, but the source currently cited in the article also states that behavior is platform dependent - in Java 6 on Windows, "the yielding thread can be scheduled back in one interrupt period later", but on Linux, "a yielded thread will not get another slice of CPU until all other threads have had a slice of CPU" (including threads of lower priority, emphasis in source). 98.69.155.56 (talk) 03:21, 10 July 2011 (UTC)[reply]

Feel free to be bold and fix it. The article could use serious improvement if you are familar with it technically.--v/r - TP 20:32, 10 July 2011 (UTC)[reply]

Topic does not fall in Compiler optimizations category

[edit]

Topic does not fall in Compiler optimizations category, or at least there is no justification. — Preceding unsigned comment added by 80.102.113.204 (talk) 15:57, 7 April 2013 (UTC)[reply]