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: async 1.0 Date: Fri, 22 Jun 2012 21:44:32 -0400 Message-ID: References: <87vcij7rvi.fsf@mithlond.arda> <82d34r8ej9.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340415883 15201 80.91.229.3 (23 Jun 2012 01:44:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 23 Jun 2012 01:44:43 +0000 (UTC) Cc: Sivaram Neelakantan To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jun 23 03:44:42 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SiFOz-0006sh-5P for ged-emacs-devel@m.gmane.org; Sat, 23 Jun 2012 03:44:41 +0200 Original-Received: from localhost ([::1]:52015 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiFOz-0004qc-6r for ged-emacs-devel@m.gmane.org; Fri, 22 Jun 2012 21:44:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiFOw-0004q1-Co for emacs-devel@gnu.org; Fri, 22 Jun 2012 21:44:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SiFOu-0005C8-Mq for emacs-devel@gnu.org; Fri, 22 Jun 2012 21:44:37 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:16264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SiFOu-0005C4-IH for emacs-devel@gnu.org; Fri, 22 Jun 2012 21:44:36 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09MCrYj/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLNBIUGA0kiBwFugmQRAOjM4FYgwU X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="191963246" Original-Received: from 76-10-182-35.dsl.teksavvy.com (HELO ceviche.home) ([76.10.182.35]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 22 Jun 2012 21:44:34 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 1D668660DC; Fri, 22 Jun 2012 21:44:32 -0400 (EDT) In-Reply-To: (John Wiegley's message of "Fri, 22 Jun 2012 16:50:35 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151098 Archived-At: > Stefan/Chong: how hard would this be to add? I'm aware we'd have to > move away from reliance on the C stack; but since they were able to > make Python stackless, I wonder how hard it would be to make Emacs > Lisp the same? It's pretty much the same problem as the one that the concurrency branch tackled: having several stacks at the same time. In the concurrency branch, they made switching from one branch to another fairly fast because it seemed to be an important property. In your case, that property might be less important, so you could use a different approach where you unwind&rewind the specpdl stack. Not using the C stack at all would require significant changes to the C code, tho. But you don't need that as long as you enforce that the continuations are not called more than once. Then you just need several C stacks (pthreads provides that, for example). Stefan