ODE & TLS

2 views
Skip to first unread message

Tilmann

unread,
Jun 26, 2009, 11:20:38 AM6/26/09
to ode-users
For my Java port, I'm now looking at use of TLS in ODE.
I have never used TLS in C++ myself so I'm not exactly sure what the
effects are.

Doing a grep for __thread and __declspec, it seems that it is only
used for the API, allowing different Threads to use ODE independently
(I think).

But to access the same World from multiple Threads, one would have to
leave TLS disabled.
TLS makes only sense when each Thread has it's own World.

Is my assumption correct?

For any Java savvies out there, is using TLS on APIs in C++ equivalent
to using different ClassLoaders for each Thread in Java?

Thanks,
Tilmann

Oleh Derevenko

unread,
Jun 26, 2009, 4:18:51 PM6/26/09
to ode-...@googlegroups.com
Currently TLS is used to store pointers to some global obejcts (the caches)
shared between collision spaces. That is done to reuse memory allocated for
caches. Prior to introducing TLS they were stored in global variables.
Also, TLS contains ODE feature initialization bitmasks for each thread.

Oleh Derevenko
-- ICQ: 36361783
Reply all
Reply to author
Forward
0 new messages