Dan Sugalski wrote: > chromatic wrote: > > > So for SDL, I'd start a separate thread that blocks on SDL_WaitEvent, > > creating and posting events when they happen. My main program would > > handle the events as normal Parrot events. Standard producer consumer > > stuff. > > > > Since it's blocking, it won't eat up too many resources -- > > that's nice. It'd be nice to have the SDL event thread ignore events
> > I don't care about though, instead of creating event PMCs I'll just > > throw away later. > > You can always Get Horribly Clever in the event handling thread and > look at what the SDL library's handed you. If it's uninteresting you > can just throw it away rather than creating an event to be discarded. > > > Is this what you have in mind? > > Yep. As I pointed out in another post, this doesn't work for integrating with at least two significant "event sources:" Windows and the Mac OS. :) UI events need to be handled synchronously on the thread to which they were delivered, since the GUI APIs are not threadsafe. Trying to handle these events from another thread is, quite simply, a doomed endeavour. -- Gordon Henriksen IT Manager ICLUBcentral Inc. [EMAIL PROTECTED]