Steven Tamm <address@hidden> writes:
I just found some free time on my hands and got back around to working
on the problem where in the carbon gui, C-g does not interrupt
synchronous subprocesses. This caused much consternation and after
checking with some people at apple, there was no easy way. The
alternatives were to finish my Jaguar/MT UI patch (which I won't go
into), or to make all blocking reads be in a separate thread. [...]
Hi Steven,
I've checked that your patch works as advertised.
I've worked out a simpler solution that uses polling though. The idea
is to patch `read' to call `select' to check for available input. If
none is after one second, poll for a user-cancel and check for input
again and repeat. Since I've used CheckEventQueueForUserCancel, the
command-period key is used instead of C-g. We can probably change it
to
C-g if we want.
The patch also handles the following cases: when Emacs is stuck in a
loop executing Lisp code and when it is stuck waiting for select
instead
of read (e.g., sleep-for).
Performance will not be a problem except perhaps for the check in
`eval'.
Andrew.