Table of Contents

Name

qthread_yield - release the CPU, allow other qthreads to run

Synopsis

#include <qthread.h>

void
qthread_yield (void);

Description

This function allows a qthread to explicitly interrupt computation and give other qthreads the chance to execute even though it has not blocked. This can be useful for things like busy-waits or cooperative multitasking. Without using this function, there is no guarantee that other qthreads will have a chance to execute until the currently running qthread performs a synchronization operation. If this function is called from a non-qthread or before the qthread_initialize() has been run, it does nothing.


Table of Contents