
17 Jun
2002
17 Jun
'02
5:29 a.m.
Simon Peyton-Jones wrote:
[...] Is there no way to get the "current context" explicitly, and treat it as some kind of "handle" that accompanies GLUT calls?
I fear this is no solution to a general problem: Most APIs out there will probably break miserably if their callbacks are executed by a thread different from the one doing the registration and/or initialization of the API. Not nice, but thread-safe APIs are not very common. :-( I don't have a good solution at hand, perhaps we could extend 'foreign import "wrapper"' by an annotation "execute callbacks in the same thread as the current one"? Ugly... Cheers, S.