YIELD(3) | YIELD(3) |
#include <mpcxx.h>
void yield(void);
yield()
function yields the current thread. This means that
the current thread is temporarily suspended and the next eligible-to-run
thread in a scheduling queue will be scheduled. If there is no
eligible-to-run thread then this function has no effect.
When a thread calls yield()
, the communication network
is polled, and if there are one or more messages, then the received
message(s) are processed. Thus, yield()
must be
called in a busy loop waiting for some particular message(s).