英文互译镜像站

Yield (multithreading)

Last updated

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.

Contents

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.

See also

References

  1. "pthread_yield". IBM .
  2. "Thread.yield". Javamex. Retrieved 24 June 2011.
  3. "sched_yield(2) - Linux manual page". man7.org. Retrieved 2025-06-02.
站点核心词加权 时间因子转换镜像 镜像小偷 网站镜像克隆 泛镜像站群