From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: Emacs does not listen on w32 Date: Mon, 14 Apr 2008 22:37:51 +0200 Message-ID: <4803C09F.5000200@gmail.com> References: <4800D965.9080202@gmail.com> <480208C8.3030401@gnu.org> <480212F7.7090409@gmail.com> <4802249D.2060909@gmail.com> <480271D2.7040304@gmail.com> <4802FD64.1080602@gmail.com> <48038487.3060201@gmail.com> <4803B6A5.4030201@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208205503 6004 80.91.229.12 (14 Apr 2008 20:38:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2008 20:38:23 +0000 (UTC) Cc: Juanma Barranquero , Eli Zaretskii , Stefan Monnier , emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 14 22:39:00 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JlVS5-00022h-JO for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 22:38:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlVRR-0000Zd-BZ for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 16:38:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlVRM-0000Wu-DF for emacs-devel@gnu.org; Mon, 14 Apr 2008 16:38:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlVRK-0000TL-TC for emacs-devel@gnu.org; Mon, 14 Apr 2008 16:38:12 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlVRK-0000TD-Hi for emacs-devel@gnu.org; Mon, 14 Apr 2008 16:38:10 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JlVRC-0002rN-QR; Mon, 14 Apr 2008 16:38:03 -0400 Original-Received: from c83-254-150-27.bredband.comhem.se ([83.254.150.27]:61575 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JlVRA-0006gz-5e; Mon, 14 Apr 2008 22:38:01 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 In-Reply-To: <4803B6A5.4030201@gnu.org> X-Antivirus: avast! (VPS 080414-1, 2008-04-14), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.150.27 X-Scan-Result: No virus found in message 1JlVRA-0006gz-5e. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1JlVRA-0006gz-5e 37f1a14834d91e66e033a7bf3b75fdc3 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95210 Archived-At: Jason Rumney wrote: > Stefan Monnier wrote: >> If you have such an infinite loop within a timer code, then Emacs *is* >> hung, and it seems perfectly fine to let the OS's IsHungAppWindow deal >> with it. >> > > I think Lennart's problem is that we don't let the OS's IsHungAppWindow > deal with it. In Windows, each Window must have its own thread for > message handling. This thread is not blocked by the infinite loop in > the Lisp thread, so as far as Windows is concerned, the message has been > received and dealt with. We could change the WM_CLOSE message to do a > blocking SendMessage instead of a non-blocking PostMessage to pass the > message on to the Lisp thread, but if we decide that the solution we > want is to let Emacs be forcibly closed after a timeout, it might be > better to have our own timeout so we can control what message we display > to the user and at least attempt to quit the Lisp blockage and shutdown > cleanly rather than letting the system do it uncleanly. I do not understand what you mean here. Does the lisp thread look for new messages when it is looping? (I think it should.) If it does then shouldn't it find a message from PostMessage? If it does not then we can't do any useful after a SendMessage with timeout either, or can we?