ctSetOWNER Allows a thread to take ownership of an existing c-tree connection. Declaration VOID ctSetOWNER(NINT sOWNR) Description ctSetOWNER() allows a thread to take ownership of an existing c-tree connection. This is useful in applications where one thread needs to perform some duty in another thread of operation. For example, a controller thread taking over a worker thread for administrative tasks. Return void Example A thread can use this function to take ownership of a c-tree connection as demonstrated by the following: NINT sOWNR = 0; /* A c-tree connection handle accessible to both threads. */ Thread #1: /* Initialize c-tree. */ INTISAM(...);
sOWNR = ctOWNER(); Thread #2: /* Take ownership of the connection. */ ctSetOWNER(sOWNR);
|
|||