[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: POSIX threds example needed
From: |
Ralf Wildenhues |
Subject: |
Re: POSIX threds example needed |
Date: |
Wed, 19 Jan 2005 12:54:05 +0100 |
User-agent: |
Mutt/1.4.1i |
* zaufi wrote on Wed, Jan 19, 2005 at 06:19:28PM CET:
>
> I'm trying to use ltdl library in multi-threaded (POSIX threads) environment.
> Unfortunately the manual does not supply enough information on that topic.
> Can anybody please provide an example code that would load a dynamic library
> in MT-safe way.
I don't know what libtool version you use. Newer versions do not
recommend the contained locking functions any more, because they
did not work together with POSIX threads.
So plainly, a safe way is to use a lock to wrap all lt_* function calls
and data access. For most uses, I would guess this to be sufficient
performance-wise. If you need finer control: we might put a new locking
implementation in place. But I for one would only look at it if someone
clearly showed real-world code which unearthed bottlenecks.
If all you need is documentation on how to use POSIX threads, there is
lots of decent documentation out on the web. If you have a specific
libltdl threads related problem with your code, show example code you
have and we'll see.
Regards,
Ralf