Contents

os_workgroup_leave

Removes the current thread from the workgroup it previously joined.

Declaration

extern void os_workgroup_leave(os_workgroup_t wg, os_workgroup_join_token_t token);

Parameters

  • wg:

    The workgroup to leave. This workgroup must be the same workgroup that the thread previously joined. If it isn’t, this function aborts the process.

  • token:

    The token you received when the thread joined the workgroup. If the data in the token is invalid, if the token belongs to a different thread, or if the workgroup in the wg parameter doesn’t match the information in the token, this function aborts the process.

Discussion

Always call this function using the same os_workgroup_t and os_workgroup_join_token_t structures you used at join time. If the workgroup or token information doesn’t match, this function aborts the current process. You may call this function safely from a real-time thread of your app.

See Also

Thread Attachment