2008/11/20 Michael Rueger <[EMAIL PROTECTED]>: > Hi all, > > the event handling rewrite slowly starts to work :-) > I'm currently fighting the parts where polling is used (like moving a > window), but more on that later. > > The question I have is about user interrupt handling. I'm a bit confused and > don't remember the history there: > was there first an interrupt semaphore that then was abandoned or was it > introduced but then not supported on some platforms? > > Or phrased differently: > do we want user interrupt go through an interrupt semaphore or rather handle > it on the image side? >
If i remember correctly, an interrupt semaphore is used to awake a process which watching for interrupts. And indeed, when key combination matching an interrupt key code, it calls setInterruptPending(), which is then eventually leads to signaling a semaphore which registered as interrupt semaphore. You can't handle it on image side, because you may not have chance to get to it (if there's another process running on same or higher priority than event ticker process). While in VM, regardless what image does, it periodically checks for interrupts, and during handling OS events, it checks if an interrupt key pressed, and if so, then signals the semaphore. At least, this is how it looks on Win32. > Michael > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- Best regards, Igor Stasenko AKA sig. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
