This method determines whether the method was invoked from the same operating system task as the one on which the object is running.
RiCBoolean RiCOSTask_exeOnMyTask(RiCOSTask * const me)
{
RiCOSHandle executedOsHandle;
RiCOSHandle myOsHandle;
RiCBoolean res;
if (me == NULL) return RiCFALSE;
/* A handle to the thread that executes the delete */
executedOsHandle = RiCOSTask_getCurrentTaskHandle();
/* A handle to ‘this' thread */
myOsHandle = RiCOSTask_getOSHandle(me);
res = ((executedOsHandle == myOsHandle) ?
RiCTRUE : RiCFALSE);
return res;
}