* MS: `SwitchToThread()` ([link](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-switchtothread)) * POSIX: `pthread_yield()` ([link](https://man7.org/linux/man-pages/man3/pthread_yield.3.html)) See this [discuss](https://stackoverflow.com/questions/65380997/how-does-the-function-pthread-yield-work): > `pthread_yield` is not standardized So, recommended to use `shed_yeld()` ([link](https://pubs.opengroup.org/onlinepubs/9699919799/functions/sched_yield.html))
SwitchToThread()(link)pthread_yield()(link)See this discuss:
So, recommended to use
shed_yeld()(link)