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: Thu, 11 Dec 2008 15:54:29 -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> <871vwecyz2.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229029569 29435 80.91.229.12 (11 Dec 2008 21:06:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2008 21:06:09 +0000 (UTC) Cc: emacs-devel@gnu.org, rms@gnu.org, gscrivano@gnu.org To: Paul R Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 11 22:07:13 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 1LAsju-0004uF-JG for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 22:06:31 +0100 Original-Received: from localhost ([127.0.0.1]:57460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAsij-0005Lp-Bu for ged-emacs-devel@m.gmane.org; Thu, 11 Dec 2008 16:05:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LAsYO-0008Nd-17 for emacs-devel@gnu.org; Thu, 11 Dec 2008 15:54:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LAsYN-0008N8-F7 for emacs-devel@gnu.org; Thu, 11 Dec 2008 15:54:35 -0500 Original-Received: from [199.232.76.173] (port=36209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LAsYN-0008Mv-9p for emacs-devel@gnu.org; Thu, 11 Dec 2008 15:54:35 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34875) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LAsYI-0005pK-I8; Thu, 11 Dec 2008 15:54:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcFALcMQUlMConz/2dsb2JhbACBbM0LgnmBLA X-IronPort-AV: E=Sophos;i="4.36,206,1228107600"; d="scan'208";a="30940706" Original-Received: from 76-10-137-243.dsl.teksavvy.com (HELO pastel.home) ([76.10.137.243]) by ironport2-out.teksavvy.com with ESMTP; 11 Dec 2008 15:54:29 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 9754E86F6; Thu, 11 Dec 2008 15:54:29 -0500 (EST) In-Reply-To: <871vwecyz2.fsf@gmail.com> (Paul R.'s message of "Thu, 11 Dec 2008 20:07:29 +0100") 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:106818 Archived-At: Stefan> Indeed. Further than that, we'd need more explicit Stefan> synchronization primitives. We could probably start with Stefan> a (atomically &rest BODY) which guarantees that BODY will be Stefan> properly protected from other threads that it will appear to be Stefan> executed atomically. > Isn't it what critical sections are for ? (critical &rest BODY) would > execute body with no thread switching. I think this feature is not > necessary with cooperative-only threading because a critical section is > any section that does not contain any 'yield' instruction. We're talking about non-cooperative scenarios (e.g. yield in QUIT). Stefan