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: Threads in emacs implementation Date: Wed, 08 Jun 2005 18:50:14 -0400 Message-ID: <87oeageaet.fsf-monnier+emacs@gnu.org> References: <6dbd4d0005060619227dd41364@mail.gmail.com> <87vf4oaft8.fsf@zemdatav.stor.no-ip.org> <87vf4oaao5.fsf@kanga.tapsellferrier.co.uk> <87r7fca84l.fsf@kanga.tapsellferrier.co.uk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118271527 22272 80.91.229.2 (8 Jun 2005 22:58:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2005 22:58:47 +0000 (UTC) Cc: jhd , Magnus Henoch , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 09 00:58:38 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dg9UO-0001Us-9o for ged-emacs-devel@m.gmane.org; Thu, 09 Jun 2005 00:57:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg9bB-00078h-W6 for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 19:04:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dg9Xp-0006Oj-RU for emacs-devel@gnu.org; Wed, 08 Jun 2005 19:01:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dg9Xm-0006Mk-Aj for emacs-devel@gnu.org; Wed, 08 Jun 2005 19:01:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg9Xl-0006F2-AU for emacs-devel@gnu.org; Wed, 08 Jun 2005 19:01:05 -0400 Original-Received: from [209.226.175.25] (helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dg9NH-00016B-V3 for emacs-devel@gnu.org; Wed, 08 Jun 2005 18:50:16 -0400 Original-Received: from alfajor ([70.48.82.205]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050608225014.BSA26128.tomts5-srv.bellnexxia.net@alfajor>; Wed, 8 Jun 2005 18:50:14 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id D4CD8D73A3; Wed, 8 Jun 2005 18:50:14 -0400 (EDT) Original-To: Nic Ferrier In-Reply-To: <87r7fca84l.fsf@kanga.tapsellferrier.co.uk> (Nic Ferrier's message of "Wed, 08 Jun 2005 21:47:22 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:38388 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38388 > I think elisp is always going to need a huge amount of blocking to use > OS threads because of the nature of dynamic scope. I expect that making cooperative threads work (with context switches only at those places where we currently allow running things like timers and process filters), is currently doable. I.e. it will probably introduce some incompatibilities, but it shouldn't be hugely difficult to get a proof of concept working well enough for "normal" use. Once we get there, it may be easier to see what the next step should be. Stefan PS: Making progress on lexical scoping will also make it easier to move forward.