From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: System calls without error checks in w32 Date: Tue, 8 Jun 2010 02:32:28 +0200 Message-ID: References: <4C037EFE.4040304@gmx.de> <87zkz9qu2r.fsf@home.jasonrumney.net> <4C0CCBCE.8080503@gmx.de> <87k4qa99l4.fsf@uwakimon.sk.tsukuba.ac.jp> <4C0D2A87.3070403@gmx.de> <4C0D4078.1030208@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1275958658 17368 80.91.229.12 (8 Jun 2010 00:57:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Jun 2010 00:57:38 +0000 (UTC) Cc: "Stephen J. Turnbull" , emacs-devel@gnu.org, Jason Rumney To: grischka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 08 02:57:35 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OLn8I-0003bo-EY for ged-emacs-devel@m.gmane.org; Tue, 08 Jun 2010 02:57:34 +0200 Original-Received: from localhost ([127.0.0.1]:39002 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLmwW-00030h-7x for ged-emacs-devel@m.gmane.org; Mon, 07 Jun 2010 20:45:24 -0400 Original-Received: from [140.186.70.92] (port=38162 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLmsE-0002LU-1A for emacs-devel@gnu.org; Mon, 07 Jun 2010 20:41:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLmkL-0007zr-P4 for emacs-devel@gnu.org; Mon, 07 Jun 2010 20:32:51 -0400 Original-Received: from mail-gx0-f169.google.com ([209.85.161.169]:45260) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLmkL-0007zi-Lv; Mon, 07 Jun 2010 20:32:49 -0400 Original-Received: by gxk20 with SMTP id 20so130448gxk.0 for ; Mon, 07 Jun 2010 17:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=fISKF5t8PLrkpq5RU+DKebyg1med0I3ddYxkWuvH//s=; b=Q5WqL3nUpRRu9OiUvQXmRuJuOitJ7B4sJAHXMPt91q+5AOMOBBX8SbQF8WRVYoyiCs OaM6MWFmfJDhNn3Esc5q9oX4NT2MPwF9RERQfJ1thd3NN2MKGvGtSe/FpDKGbw997ecK XmE7f3Axh40yHSO40gF20uEHldb3/fL46fOb0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=oqU+Nm89Ubes7C+YLNb3r0k8FsrZ3+pufkHBmC4NmU51xAUZ8Q8nZWsNFSjvjT5PzH LpxGnYwW2K2UeOKjujCbL3kT6o6Dp6vI/Lon5MQYaYIsK0MQmwzh8o6Ggr2umktDDMr3 +QGu1RAAB4XbEm+tjmn+NbCy5j+qERjlcU8mQ= Original-Received: by 10.101.3.38 with SMTP id f38mr15557367ani.90.1275957168852; Mon, 07 Jun 2010 17:32:48 -0700 (PDT) Original-Received: by 10.100.154.15 with HTTP; Mon, 7 Jun 2010 17:32:28 -0700 (PDT) In-Reply-To: <4C0D4078.1030208@gmx.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:125627 Archived-At: On Mon, Jun 7, 2010 at 8:54 PM, grischka wrote: > Lennart Borgman wrote: >> >> On Mon, Jun 7, 2010 at 7:21 PM, grischka wrote: >>> >>> Lennart Borgman wrote: >>>> >>>> I guess the idea of having two event loops/thread is not in itself >>>> bad. If the gui thread is never blocked it can be used to convey >>>> status information at least to the user. (You can put these in >>>> temporary windows inside the frame for example.) >> >>> Since this is Emacs you'd probably want to format your status info >>> in Lisp. =C2=A0Bye nice idea and welcome to thread hell. >> >> I see no reason to format it in Lisp. Or rather my idea is that the >> status information is formated by the lisp thread in advance and sent >> to the gui thread in a non-lisp format. Then the gui thread can offer >> that information without contactinog the lisp thread. > > But then what is the benefit from that additional effort of preparing > and sending a "non-lisp" representation forth and back, except to satisfy > the requirements of having two threads? =C2=A0Have only one thread and yo= u > can format and display the info in one go. =C2=A0Simple, reliable, conclu= sive. I suppose the rational for having two threads is that basic gui operations should not be stalled by lisp computations. I do not know how it is actually implemented now in Emacs but with two threads you can post messages between them to coordinate them without interrupting the gui handling badly. Here is an example: - the user resize the frame during a lisp computation. The resizing happens then entirely in the gui thread. - When resizing is finished the gui thread can send a message telling that to the lisp queue. - The lisp queue can then handle this when it has time to do that and ask the system for the new frame size. - The gui thread can also send resizing messages during resizing which the lisp thread can safely ignore if it is occupied since the information is available later. The gui thread can send a message to the lisp thread when resizing is finished and tell that resizing has been done. The