
Rob Stewart wrote:
From: "Johan Nilsson" <johan.nilsson@esrange.ssc.se>
"Malcolm Noyes" <boost@alchemise.com> wrote in message
IIRC, the complexity arises when you start to consider global scope thread specific variables in different translation units, together with the possibility that threads can be started before 'main' and waited on, i.e. joined, after 'main has completed. Ah, I see the
Do you really want to account for the creation and joining of threads outside of main()? I'm no MT expert, but I recall learning that one should avoid creating threads prior to main. It makes statics and even main() difficult to write. Isn't that correct? If so, should Boost.Thread really account for bad designs?
The biggest problem with this is that global static objects are initialized before main(). Is it necessarily a bad thing for the constructor of such an object to create a thread? Mike