[ODE] ODE - thread safety
bram at sara.nl
Tue Aug 15 07:44:09 MST 2006
Mirko Radowitz wrote:
> I have a questions to ODE and thread safety. I read that ODE is not thread save, but for my application is that very important.
> So can someone tell me, why ODE is not threadsafe?
> And maybe someone can explain me how I can make it threadsafe, if it is possible at all?
Do you have multiple threads accessing ODE?
If not, you have no problem.
A thread for ODE, another thread for sound, another thread for rendering,
that should work just fine.
Only if you want to have multiple threads accessing ode,
you will have a problem.
ODE functions may not be re-entrant.
This is, e.g. when ODE is using static data, or heap-data.
Re-entrant funcs typically should only use stack data, and
guard writing global data with semaphores, or mutexes.
> Many thanks for your help!
Bram Stolk, VR Engineer SARA, Amsterdam. tel +31 20 592 3000
"Windows is a 32-bit extension to a 16-bit graphical shell for an 8-bit
operating system originally coded for a 4-bit microprocessor by a 2-bit
company that can't stand 1 bit of competition."
More information about the ODE