SetThreadGroupID
Changes the thread group ID of the running thread
#include <nwthread.h>
int SetThreadGroupID (
int newThreadGroupID);
This function returns the ID of the previously current thread group if successful. Otherwise, it returns EFAILURE and sets errno to:
The SetThreadGroupID function determines which instance of the current connection, current task, current screen, and so on, is used. (See Section 1.4, Context and Thread Groups.) Since a thread group is owned by a particular NLM, this function also sets the current NLM ID to the NLM that owns the thread group that is being made current.
NOTE:A library should save and restore the thread group ID whenever it changes the current thread group.
#include <nwthread.h> int currentThreadGroupID; int newThreadGroupID; currentThreadGroupID = SetThreadGroupID (newThreadGroupID);