Subj : Re: Boost.Threads on its way to C++0x To : comp.programming.threads From : Marcin 'Qrczak' Kowalczyk Date : Sun May 01 2005 07:13 am David Hopwood writes: > The compiler can tell which statics are guaranteed to only be > accessed by a single thread (the graph of which functions > potentially call each other that is needed to determine this, > is also needed for other optimizations). I don't believe it. Besides requiring whole program analysis (separate compilation made impossible), such analysis would be mostly defenceless where function pointers or virtual methods are involved. It's very hard to prove negative results, like that a given piece of code will *never* be called from other threads. Such optimizations would be impractical. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .