[Mac-emacs-devel] 10.2 and C-g (was: 'Fatal error (6).Abort' (with fix))
Brought to you by:
akochoi
|
From: Steven T. <ste...@ma...> - 2002-08-09 16:04:00
|
Yes it would. I'm not sure I've posted this to the list, but it makes sense. The main problem is that C-g does not interrupt synchronous processes. This is because C-g does not generate an interrupt at all. The only way to get keyboard input is to be in a call to WaitNextEvent or ReceiveNextEvent. The carbon event manager allows the event loop to run asynchronously in its own thread, so C-g could be recieved and then passed into emacs-lisp. So in order to fix the problem, we can place event handling in one thread, and the emacs lisp loop in a separate thread. Then when C-g comes into the UI, we can immediately post an interrupt to the lisp loop and it will work just like X windows. However due to other restrictions, this event handling thread can only be the "main" thread. This, I think, is a bug in Mac OS X, but it's documented quite explicitly. In addition, interrupt signals like SIGINT and SIGPIPE are also only sent to the main thread. This means that both the lisp loop and the event loop need to be in the main thread for emacs to work. 10.2 includes thread-specific signal masks (specifically it includes pthread_kill and pthread_). This means that SIGINT and SIGPIPE can be sent to a thread other than the main thread. Therefore in 10.2 (and darwin build 6.0), the Carbon Event Manager's asynchronous event handling can be used and C-g will work like on w32 or x. And emacs will be more efficient and responsive. -Steven On Friday, August 9, 2002, at 01:54 AM, dm...@dm... wrote: > * ste...@ma... [2002-08-09 06:59:27] >> When 10.2 comes around and the multithreaded UI can be used, a call >> to add_keyboard_wait_descriptor would fix the select problem that >> this patch concerns. > > Forgive my ignorance, but would this also be an opportunity to make > ctrl-g work better ? It's one of main irritations which remains for > me. > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Mac-emacs-devel mailing list > Mac...@li... > https://lists.sourceforge.net/lists/listinfo/mac-emacs-devel |