From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard M Stallman Newsgroups: gmane.emacs.devel Subject: Re: multi-threaded Emacs Date: Mon, 01 Dec 2008 09:06:54 -0500 Message-ID: References: <87abbiody1.fsf@master.homenet> <877i6l5d8s.fsf@master.homenet> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1228140466 10518 80.91.229.12 (1 Dec 2008 14:07:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Dec 2008 14:07:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Giuseppe Scrivano Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 01 15:08:50 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 1L79S3-0005VW-Hd for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 15:08:39 +0100 Original-Received: from localhost ([127.0.0.1]:39292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L79Qt-0007Lu-Ew for ged-emacs-devel@m.gmane.org; Mon, 01 Dec 2008 09:07:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L79Qn-0007IH-2G for emacs-devel@gnu.org; Mon, 01 Dec 2008 09:07:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L79Ql-0007Ft-Me for emacs-devel@gnu.org; Mon, 01 Dec 2008 09:07:19 -0500 Original-Received: from [199.232.76.173] (port=51153 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L79Ql-0007Ff-FX for emacs-devel@gnu.org; Mon, 01 Dec 2008 09:07:19 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:34370) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L79Ql-0007zI-6u for emacs-devel@gnu.org; Mon, 01 Dec 2008 09:07:19 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1L79QM-0006J3-Lp; Mon, 01 Dec 2008 09:06:54 -0500 aContent-Type: text/plain; charset=ISO-8859-15 In-reply-to: <877i6l5d8s.fsf@master.homenet> (message from Giuseppe Scrivano on Sun, 30 Nov 2008 18:34:43 +0100) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:106364 Archived-At: Internal data shared among threads must be accessed only inside critical sections in the .c code to have atomic operations on it. I don't think we want to make such pervasive and inconvenient changes in the C code. What we want, I think, is to allow thread switches only inside the QUIT macro. Being able to program in terms of multiple threads will be useful for situations such as multiple terminals. However, I don't see much need in Emacs for real parallelism. > It should not be hard to find all the existing threads and mark all > their stacks and specpdls. I like the Stefan's idea of stopping all running threads while the GC is executed, in this way we can use the current GC without big changes. At least until a concurrent [parallel] GC will be alive. Making GCC handle the existence of multiple threads should be easy with the approach I suggested above, once thread switching is controlled.