Panda types not Thread safe?

I remember reading somewhere that panda functions are not thread safe.
But it seems that even the Panda types aren’t thread safe?

I’m trying to use the PointerToArray class in a thread that is not the main thread. I am using it only within that thread.

However, I get crashes in typeHandle.cxx (line 101)

assert(rnode->_memory_usage[memory_class] >= 0);

It seems to be using accessing some global TypeRegistry stuff?

Is there some way to turn this off?
Or is it just never safe to use a Panda type in any thread other than the main thread?

It is just never safe to use a Panda type in any thread other than the main thread.

If you compile a custom Panda with SIMPLE_THREADS set to ‘undef’, then you may use Panda safely in a multi-threaded application.

David