
Tonko Juricic wrote:
Dayton 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 code.
If you don't use TLS cleanup, you don't need the cleanup support. Mike