
6 Jul
2011
6 Jul
'11
1:47 p.m.
Quoth Brandon Allbery
I don't know about the general case, but OS X does treat the main thread specially here; the (native, not X11) framework sets up the connection to Core Graphics in the main thread before invoking the main program, so you can't make whatever it is (thread local storage seems likely) happen in a different thread.
For one general case, C++ static constructors run prior to main(), so any thread dependency introduced by a static C++ object would target the initial program thread. Donn