From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: multi-threaded Emacs Date: Wed, 10 Dec 2008 20:59:41 -0500 Message-ID: References: <87abbiody1.fsf@master.homenet> <877i6l5d8s.fsf@master.homenet> <874p1npvtj.fsf@master.homenet> <87ej0qci8g.fsf@master.homenet> <87y6yxm7xr.fsf@master.homenet> <87hc5gyn9x.fsf@master.homenet> <87ej0ixx97.fsf@master.homenet> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228960807 18128 80.91.229.12 (11 Dec 2008 02:00:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 02:00:07 +0000 (UTC) Cc: gscrivano@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 11 03:01:11 2008 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 1LAarT-0002bM-JI for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 03:01:07 +0100 Original-Received: from localhost ([127.0.0.1]:46515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAaqI-0002mC-4v for ged-emacs-devel@m.gmane.org; Wed, 10 Dec 2008 20:59:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAaqD-0002lh-8e for emacs-devel@gnu.org; Wed, 10 Dec 2008 20:59:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAaqB-0002lU-NG for emacs-devel@gnu.org; Wed, 10 Dec 2008 20:59:48 -0500 Original-Received: from [199.232.76.173] (port=43832 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAaqB-0002lR-I3 for emacs-devel@gnu.org; Wed, 10 Dec 2008 20:59:47 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:9280 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAaq8-0005Mu-AJ; Wed, 10 Dec 2008 20:59:44 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAO8CQElMCrcb/2dsb2JhbACBbMUggwaBLA X-IronPort-AV: E=Sophos;i="4.33,749,1220241600"; d="scan'208";a="30906274" Original-Received: from 76-10-183-27.dsl.teksavvy.com (HELO pastel.home) ([76.10.183.27]) by ironport2-out.teksavvy.com with ESMTP; 10 Dec 2008 20:59:41 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 097978224; Wed, 10 Dec 2008 20:59:41 -0500 (EST) In-Reply-To: (Richard M. Stallman's message of "Wed, 10 Dec 2008 13:18:46 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:106782 Archived-At: > I think if `yield' is called in accept-process-output and read_char, the > remaining places where `yield' might be needed will be fairly few. > That sort of thing could be enough for the thread-per-terminal job. > It would also be good for specially written parallel programs. > But that's as far as it would go. Indeed. Further than that, we'd need more explicit synchronization primitives. We could probably start with a (atomically &rest BODY) which guarantees that BODY will be properly protected from other threads that it will appear to be executed atomically. Such a primitive should also include constraints such as "BODY cannot include non-undoable operations", e.g. it can't save to a file. Stefan