LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   dlopen in multi-threading environnement (https://www.linuxquestions.org/questions/programming-9/dlopen-in-multi-threading-environnement-338645/)

yakotey 06-30-2005 03:46 AM

dlopen in multi-threading environnement
 
Hi,

It looks like threads can't make dlopen at the same time...

Is that true?

jonaskoelker 06-30-2005 05:40 AM

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

yakotey 06-30-2005 08:36 AM

thanks a lot jonaskoelker.
that's exactely what i was thinking.


All times are GMT -5. The time now is 09:25 PM.