From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Steven Tamm Newsgroups: gmane.emacs.devel Subject: Re: Mac OS X - Hang / C-g problem patch Date: Fri, 6 Dec 2002 10:15:18 -0800 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v548) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1039199104 5466 80.91.224.249 (6 Dec 2002 18:25:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 6 Dec 2002 18:25:04 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18KN9q-0001Pz-00 for ; Fri, 06 Dec 2002 19:25:02 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18KNIa-0001SO-00 for ; Fri, 06 Dec 2002 19:34:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18KN26-0001Sn-00; Fri, 06 Dec 2002 13:17:02 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18KN12-0006u3-00 for emacs-devel@gnu.org; Fri, 06 Dec 2002 13:15:56 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18KN0W-00068X-00 for emacs-devel@gnu.org; Fri, 06 Dec 2002 13:15:55 -0500 Original-Received: from smtpout.mac.com ([17.250.248.97]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18KN0V-00068R-00 for emacs-devel@gnu.org; Fri, 06 Dec 2002 13:15:23 -0500 Original-Received: from asmtp02.mac.com (asmtp02-qfe3 [10.13.10.66]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id gB6IFLNg010840 for ; Fri, 6 Dec 2002 10:15:22 -0800 (PST) Original-Received: from mac.com ([12.236.43.16]) by asmtp02.mac.com (Netscape Messaging Server 4.15) with ESMTP id H6PMPL00.5D3; Fri, 6 Dec 2002 10:15:21 -0800 Original-To: Andrew Choi In-Reply-To: X-Mailer: Apple Mail (2.548) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:9925 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:9925 >> > > I'm not sure it will be much worse than CheckEventQueueForUserCancel > unless we code it up and run a profiler on it. Most likely, the event > queue will just be empty most of the time we check it. > > Polling the event queue every time through eval will no doubt cost an > overhead. Polling is not a bad solution to detect the cancel key in > `select' and `read' though. Polling is not bad in the select/read case, and it probably should be checked in (once I get the answer from the carbon-development list about FindSpecificEventInQueue). As for the test in eval, I'll run the profiler on it this weekend and see how much it adds to the overall cost of eval. For the list, What would be a good simple-to-execute lisp function to profile to measure changes to Feval? I was going to use regexp-opt. >> > > That doesn't seem like a good solution: an event that every application > sees? But please do let me know what additional information you can > get > from the carbon mailing list. In terms of program architecture and > efficiency, your very first attempt was the best: using a separate > thread to capture all input and pass that on to a main thread. But hey > I'm not working on it, so I really shouldn't be saying anything :-). It works a little differently than this. The global hotkey is only sent to the application that requests it. The problem is that while the hotkey is registered, it is NEVER sent to any other application. So it won't work (because not passing C-g to the terminal application is unacceptable).