Dan Sugalski wrote:
Gordon Henriksen wrote:
> So, for GUI events, could calling into parrot and doing the > following from the OS event handler work to synchronously dispatch > an event? > > ... parrot-ify a mouse-moved event into $P5 ... > post $P5 > checkevent > > Hm. No.
For that I think you'd want:
post $P5 wait $P5
I suppose that would work, since the "wait" would block the main OS thread.
Well... sort of. Wait will drain the event queue until the event you're waiting on has been completed.
It does cause unnecessary context switches, though.
Nah. There may not even be any threads involved.
What happens in this case if the parrot eventloop is stopped?
That's a good question, and I'm not sure what the right answer is.
I think, though, that "You lose" is the best we're going to do. If you've blocked one or more events from being handled but are waiting for them to be handled before continuing then you're doomed, and there's not much to be done about it.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk