The SwitchToThread function causes the calling thread to yield execution to another thread that is ready to run on the current processor. The operating system selects the thread to yield to.
Declare Function SwitchToThread Lib "kernel32.dll" () As Long
|Operating Systems Supported|
|Requires Windows NT 4.0 or later; Win9x/ME: Not supported|
|If calling the SwitchToThread function causes the operating system to switch execution to another thread, the return value is nonzero.|
If there are no other threads ready to execute, the operating system does not switch execution to another thread, and the return value is zero.