Re: mixture of multi-threading libraries



On 5 déc, 15:40, Markus Elfring <Markus.Elfr...@xxxxxx> wrote:
Since thread and lock are not at the same level, I was wondering
how to do it properly.

Do you ever need that a shared data structure will be simultaneously accessed by
threads that were created by different software libraries?

I can't know in advance since I am writing a general purpose library.
For the moment, I am only Pthread compliant. But some users may find
Pthread to heavy or too complex (deadlock, race condition, pool of
threads, etc...) and would prefer some fast lightweight threads to
implement events or concurrent tasks for examples. Instead of dealing
with all the complexity of Pthread, they may just rely on Pth (the
most portable?). So I was evaluating the difficulty of being compliant
with both levels of threads at the same time and independantly. I
wasn't saying that I want to implement a two-level scheduler...

a+, ld.
.