From: Michael Glassford (glassfordm_at_[hidden])
Date: 2004-07-27 21:23:21
Tonko Juricic wrote:
> I tend to think in the similar direction.
> Threads class happens to be the first one that I tried
> to use as a newcomer to boost++ so I ended up
> 'complaining' here.
> In particular, losing features that one learns to take
> for granted on some platforms (like thread stop,
> suspended start) is not motivating.
Boost.Threads is cross platform and, unfortunately, some features are
hard to support on all platforms. Hopefully these ones can be provided
in some fashion in the future, however.
> Also, relying on OS notifications (like
> DLL_THREAD_DETACH on Win32) for TLS cleanup, and extra
> code required to support boost threads static library
> on Win32 is not my favourite, despite a rather
> ingenious implementation.
If you can think of a better way, we'd be glad to hear it.
> I think it would be best if we can completely avoid
> using Win32 DLL process/thread notifications and make
> TLS cleanup part of the thread function object.
The next release will clean up TLS right after the thread function
exits, but that doesn't work for threads that aren't created by
Boost.Threads. If that's good enough for you, good! However, if you need
TLS cleanup for threads not created by Boost.Threads, the
DLL_THREAD_DETACH or some other approach is still necessary.
> I already expressed, somewhat radical I guess, opinion
> that, at least on Win32, TLS functionality is probably
> not worth the trouble of existing cleanup support
If you don't use TLS cleanup, you don't need the cleanup support.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk