From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: What's the problem? (Was: Are there plans for a multi-threaded Emacs?) Date: 08 Dec 2003 16:01:45 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87oevbes4h.fsf@emacswiki.org> <20031117040607.C6C5D79B72@server2.messagingengine.com> <87ekvpx18d.fsf@emptyhost.emptydomain.de> <4nad6cikxy.fsf@holmes.bwh.harvard.edu> <4nllpt3hr3.fsf@lockgroove.bwh.harvard.edu> <5bad69zd43.fsf@lister.roxen.com> <4noeuon378.fsf@lockgroove.bwh.harvard.edu> <4ny8tsgxy6.fsf@lockgroove.bwh.harvard.edu> <4nhe0ggv0u.fsf@lockgroove.bwh.harvard.edu> <4nk75bwjaf.fsf@lockgroove.bwh.harvard.edu> <4nsmjv8d32.fsf@collins.bwh.harvard.edu> <4nu14b6q33.fsf@collins.bwh.harvard.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1070917813 32158 80.91.224.253 (8 Dec 2003 21:10:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2003 21:10:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Dec 08 22:10:08 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ATSds-0001Ba-00 for ; Mon, 08 Dec 2003 22:10:08 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ATSdr-0000f9-00 for ; Mon, 08 Dec 2003 22:10:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ATTYL-0006ji-IG for emacs-devel@quimby.gnus.org; Mon, 08 Dec 2003 17:08:29 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1ATTTo-0005WW-6p for emacs-devel@gnu.org; Mon, 08 Dec 2003 17:03:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ATTTH-0005M6-Ep for emacs-devel@gnu.org; Mon, 08 Dec 2003 17:03:46 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.24) id 1ATTTG-0005LP-Qb for emacs-devel@gnu.org; Mon, 08 Dec 2003 17:03:14 -0500 Original-Received: from vor.iro.umontreal.ca (vor.iro.umontreal.ca [132.204.24.42]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 65BE720FB6; Mon, 8 Dec 2003 16:01:46 -0500 (EST) Original-Received: by vor.iro.umontreal.ca (Postfix, from userid 20848) id 310E13CFD9; Mon, 8 Dec 2003 16:01:46 -0500 (EST) Original-To: Ted Zlatanov In-Reply-To: <4nu14b6q33.fsf@collins.bwh.harvard.edu> Original-Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18568 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18568 > There seems to be interest in a real multithreading solution, be it > cooperative or preemptive, or an event-driven API. I'm OK with any The event-drive API is available right now (see process-filters and run-with-idle-timer), but people don't like it too much. Especially writing background tasks using run-with-idle-timer is inconvenient. The next step is to provide a simple multithreading model which will simply allow the same as the current event-driven API but more conveniently (i.e. something like cooperative multithreading, or even with a bit of preemption, but probably all the switching done by hand in the elisp interpreter: no concurrency inside the C code). As for true parallelism, as I said the only use for it is speed, so I don't see it as particularly important. But maybe within 10-20 years things will have changed a little. Stefan