|
From: | Adrian Robert |
Subject: | Re: Pretest next week |
Date: | Wed, 28 Jan 2009 14:19:55 +0200 |
On Jan 28, 2009, at 11:34 AM, Jason Rumney wrote:
Chong Yidong wrote:Adrian Robert <address@hidden> writes:What is the entry point for detecting the Ctrl-G (or any other user keyboard input), when a tight loop is running, such as (while t t)? Is the SIGIO signal handler used, or is W32 itself asynchronously calling something in w32fns.c or w32term.c on a second thread?I think this is done in the SIGIO signal handler (at least, according to the comment for w32_read_socket in w32fns.c). Jason, could you confirmthis?W32 does not have a SIGIO signal handler, so that comment is probably a copy and paste error. On Windows, a second thread is listening for window system messages. w32_read_socket is the Lisp thread's message handler, C-g detection is done in post_character_message (w32fns.c) which is the point where the input message is posted from the window system message handling thread to the lisp thread.
This could probably be done under NS as well. There might be issues with one or the other thread needing to be the "primary" one, and some degree of rearchitecting would be needed, using the W32 port as a guide. So, it might be simpler if there's any way to get the conventional keyboard.c timer-driven input polling done through the QUIT macro under NS.
[Prev in Thread] | Current Thread | [Next in Thread] |