From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: Threads in emacs implementation Date: Wed, 08 Jun 2005 20:52:26 +0100 Message-ID: <87vf4oaao5.fsf@kanga.tapsellferrier.co.uk> References: <6dbd4d0005060619227dd41364@mail.gmail.com> <87vf4oaft8.fsf@zemdatav.stor.no-ip.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1118261032 19470 80.91.229.2 (8 Jun 2005 20:03:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Jun 2005 20:03:52 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 08 22:03:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dg6j0-0005G0-4m for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 22:00:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg6pm-0007OW-AD for ged-emacs-devel@m.gmane.org; Wed, 08 Jun 2005 16:07:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dg6pF-0007LI-8N for emacs-devel@gnu.org; Wed, 08 Jun 2005 16:06:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dg6pC-0007J8-2j for emacs-devel@gnu.org; Wed, 08 Jun 2005 16:06:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dg6pB-0007Ir-O4 for emacs-devel@gnu.org; Wed, 08 Jun 2005 16:06:53 -0400 Original-Received: from [80.168.156.78] (helo=owls-tree.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Dg6nw-0005nn-Rn for emacs-devel@gnu.org; Wed, 08 Jun 2005 16:05:37 -0400 Original-Received: from [80.168.156.68] (helo=kanga) by owls-tree.tapsellferrier.co.uk with esmtp (Exim 4.50 #1 (Debian)) id 1Dg6ae-0006ns-8v; Wed, 08 Jun 2005 20:51:52 +0100 Original-Received: from nferrier by kanga with local (Exim 4.44) id 1Dg6bD-0004CJ-73; Wed, 08 Jun 2005 20:52:27 +0100 Original-To: Magnus Henoch In-Reply-To: <87vf4oaft8.fsf@zemdatav.stor.no-ip.org> (Magnus Henoch's message of "Wed, 08 Jun 2005 20:01:23 +0200") 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:38365 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:38365 Magnus Henoch writes: > I've been thinking about using GNU pth to implement threads in Emacs. > GNU pth only does cooperative threading, and has special non-blocking > versions of some syscalls (blocking the current thread instead of the > whole process). Ideally this would mean that existing > (i.e. non-yielding) Lisp code would not be affected, and network code > could be run in a background thread. > > The greatest obstacle to this seems to be shallow binding - you'd have > to unwind one thread's stack and rewind another's when switching > threads. Maybe there's an easier way that I don't see... I don't see why this subject keeps coming up. We don't need threads in elisp. Just more asynchronous network implementations. Anyway, async code is so much more fun to write than threaded code. Threads are for beginners. Nic Ferrier