Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
Select your favorite languages :
  • Or search :

Idiom #241 Yield priority to other threads

Explicitly decrease the priority of the current process, so that other execution threads have a better chance to execute now. Then resume normal execution and call function busywork.

System.Threading
Thread.Yield();
busywork();
import "runtime"
runtime.Gosched()
busywork()
Thread.yield();
busywork();
uses Classes;
TThread.Yield;
busywork;
::std::thread::yield_now();
busywork();

New implementation...
< >
programming-idioms.org