[Openmcl-devel] thread overview
gb at clozure.com
Sun Aug 22 21:50:42 UTC 2004
On Sun, 22 Aug 2004, alex crain wrote:
> All the thread stuff makes sense, including giving a dedicated thread
> to each edit window,
> but why is there a separate houskeeping thread for COCOA? Why not just
> use the main
> thread for that stuff since it already runs the periodic events?
The main (initial) thread isn't "already running periodic events" in the
Cocoa environment, it's waiting for and handling Cocoa events.
At one point, I tried to do housekeeping periodically in the Cocoa event
thread (via an NSTimer). One of the periodic activities is to FORCE-
OUTPUT on listener output streams; since the Cocoa event thread is also
responsible for processing that "output" when it appears as input on
the other side of a pty pair, there were all kinds of ways to deadlock.
(The gory details are especially ... gory.)
More information about the Openmcl-devel