Yield Context (sb_YieldCtx)

A yield context contains the yield callback function and related data.

Yielding may be required on some co-operative operating systems. Yielding can also be used for debugging (For example, to confirm that the code is being executed). If yielding is to be used, the context must be created before any other operations are carried out, and it must be the last object destroyed. Note that on pre-emptive platforms, a yield context is not required; in this case, NULL can be used.

To create a yield context, call hu_YieldCreate(). To destroy a yield context call hu_YieldDestroy(). The type definition for the yield callback function (hu_YieldFunc()) is defined in the header file huyield.h.