Yield (multithreading)

In computer science, yield is an action that occurs in a computer program during multithreading, of forcing a processor to relinquish control of the current running thread, and sending it to the end of the running queue, of the same scheduling priority.

Examples

Different programming languages implement yielding in various ways.

In coroutines

Coroutines are a fine-grained concurrency primitive, which may be required to yield explicitly. They may enable specifying another function to take control. Coroutines that explicitly yield allow cooperative multitasking.

References

  1. "pthread_yield".
  2. "Thread.yield". Javamex. Retrieved 24 June 2011.

See also

This article is issued from Wikipedia - version of the 11/27/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.