[Haskell-cafe] How to ensure code executes in the context of aspecific OS thread?

Brandon Allbery allbery.b at gmail.com
Wed Jul 6 19:33:02 CEST 2011


2011/7/6 Gábor Lehel <illissius at gmail.com>:
> Hmm. That does seem like a pretty strong "disproof". I wonder if my
> hypothesis is wrong in general, or if this particular library does in
> fact have other requirements (thread-local storage or such) (and in
> this case whether my other assumption was wrong and this is actually
> the usual case), or if there's something else we're missing.

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.

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms



More information about the Haskell-Cafe mailing list