next up previous contents
Next: 7.1 Object Sets Up: CMU Common Lisp User's Previous: 6.9.2 Examples of Signal

Event Dispatching with SERVE-EVENT

By Bill Chiles and Robert MacLachlan

It is common to have multiple activities simultaneously operating in the same Lisp process. Furthermore, Lisp programmers tend to expect a flexible development environment. It must be possible to load and modify application programs without requiring modifications to other running programs. CMU Common Lisp achieves this by having a central scheduling mechanism based on an event-driven, object-oriented paradigm.

An event is some interesting happening that should cause the Lisp process to wake up and do something. These events include X events and activity on Unix file descriptors. The object-oriented mechanism is only available with the first two, and it is optional with X events as described later in this chapter. In an X event, the window ID is the object capability and the X event type is the operation code. The Unix file descriptor input mechanism simply consists of an association list of a handler to call when input shows up on a particular file descriptor.





Raymond Toy
Mon Jul 14 09:11:27 EDT 1997