I tried googling for `dlopen thread safety', no luck. I found an interesting link, though:
http://gcc.gnu.org/ml/java/2001-10/msg00107.html (beware of the date).
In any case, I find it likely that dlopen need to mutex something (kernel vmem tables? Loading a symtab into ram?).
I haven't investigated it thoroughly, so I don't know--but whatever the case may be, you can always just
Code:
def my_dlopen(foo):
mutex.lock()
library_dlopen(foo)
mutex.unlock()
hth --Jonas