Boost logo

Threads-Devel :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-03-12 09:04:48

Today I found a little time to prepare for start of the tss rewrite on

During the attempt to catch up the thread_rewrite branch, to find
out how we are going on windows I found the following:

1) It seems like Anthony is trying to aim for a header only implementation
    on windows. Is my impression true? If so, I would like to learn the
    for it. I believe header only should be avoided as much as possible,
and only
    be used when linking is not feasible.

2) TSS cannot be implemented header only. So even if there is an agreement
    for it, it could not be done (on windows).

3) I cannot see the founding blocks we discussed for splitting the
thread library
   into platform dependant code. All I found is that in the hpp files
the windows
   part is #ifedef'fed to win32 specific includes leaving behind old
   (commented out) code fragments still belonging to windows.

4) The cpp files altough empty (in the windows case) are still
   beeing compiled. Do we really want such an architecture?

Can we possibly go along the lines:

    #include "win/mutex.hpp"
#elif defined (BOOST_HAS_MPTASKS)
    #include "mpt/mutex.hpp"
#elif defined (BOOST_HAS_PTHREADS)
    #include "pthreads/mutex.hpp"
    #include "default/mutex.hpp"

where default might be the single threaded case or issue a compiler

And for the cpp files in a similar fashion:
    #include "win/mutex.cpp"
#elif defined (BOOST_HAS_MPTASKS)
    #include "mpt/mutex.cpp"
#elif defined (BOOST_HAS_PTHREADS)
    #include "pthreads/mutex.cpp"
    #include "default/mutex.cpp"

Altough I am a little afraid that it might be hard to get the include
path straight for the cpp files since they are not in the main boost
include path but in the src path.

I would alos like to hear what Matt has to say about this for the linux

Btw.: Do we have anyone for the MPTASKS? I believe it is mac os, is it?

What do you think?



Threads-Devel list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at