* Martin Cracauer <20090121162515.ga20...@cons.org> : Wrote on Wed, 21 Jan 2009 11:25:15 -0500:
| You definitely want to do an event loop on the REPL fd and the | graphics subsystem here, no threads. | | Whether it's easy to hack up cl-opengl to do that is a different | matter but it would be wise on their part to provide a hook for an | event loop. | | The threads in CMUCL won't work reliably as-is, green or not. You're right of course, and my suggestion to use CMUCL:MP will not work as expected. I apologise for posting that. An example of how to do the event loop is in ltk.lisp (look for SERVE-EVENT and comments there). However this LTK approach has not worked reliably for me. Only CLX has been satisfactory. The problem with ALL foreign GUIs (GLUT, TCL, etc) is that they want control of the main loop and it is is entirely in foreign land. The application makes a foreign call to (say for example) glutMainLoop(3GLUT) ,---- | enters the GLUT event processing loop. This routine should be called at | most once in a GLUT program. Once called, this routine will never | return. It will call as necessary any callbacks that have been | registered. `---- Once you hand over control to the foreign code, youre done. [If somewhere the foreign code decides to call exit(2) your lisp process dies]. Registering a callback to process events on other FDs may not be always be feasible or reliable. -- Madhu