Offload KB - offload-library
Old Content Alert
Please note that this is a old document archive and the will most likely be out-dated or superseded by various other products and is purely here for historical purposes.
int offloadThreadJoin(offloadThread_t threadID);
Joins an Offload block to the current running thread.
If the Offload block is still running, the caller PPU thread will sleep for a certain time before attempting to join again. This time can be modified with offloadSetUSleepTime and offloadGetUSleepTime functions, which have global scope. If you want to change the amount of time a thread will sleep locally for this threadID only, try using offloadThreadJoinWithSleep, or if you prefer to manage manually what to do when joining fails, use offloadThreadTryJoin.
If the current running thread is running fibers, it will attempt to yield the fiber to another instead of sleeping.
A non-zero return value indicates an error has occured. If an invalid threadID is provided, behaviour is undefined.