[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] running the interpreter from my own thread on the C side



this seems to work fine, haven't had a problem with it yet, but is it kosher, i.e. will it screw things up somehow?

void
* glSchedThreadFunc( void * data ) {


VMGlobals * g = gMainVMGlobals;
PyrObject * w = (PyrObject*)data; // this is an instance of sc class GLWindow


...


true) {


pthread_mutex_lock(&gLangMutex);


...

++g->sp; SetObject( g->sp, w );
runInterpreter(g, s_prRender, 1);


pthread_mutex_unlock(&gLangMutex);


...
}
...
}

thanks,
_c