From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Concurrency, again Date: Thu, 27 Oct 2016 20:27:34 +0300 Message-ID: <8360odu2gp.fsf@gnu.org> References: <87wq97i78i.fsf@earlgrey.lan> <86k2dk77w6.fsf@molnjunk.nocrew.org> <9D64B8EA-DB52-413D-AE6A-264416C391F3@iotcl.com> <83int1g0s5.fsf@gnu.org> <83twckekqq.fsf@gnu.org> <83funkwfzf.fsf@gnu.org> <87k2cwe4wl.fsf@jupiter.lan> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477589975 13721 195.159.176.226 (27 Oct 2016 17:39:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2016 17:39:35 +0000 (UTC) Cc: stefan.huchler@mail.de, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 27 19:39:31 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bzodx-0000Jc-5W for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2016 19:39:09 +0200 Original-Received: from localhost ([::1]:43349 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzodz-0000Zh-GL for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2016 13:39:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzoSl-0000ew-Jg for emacs-devel@gnu.org; Thu, 27 Oct 2016 13:27:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzoSi-00007X-Gz for emacs-devel@gnu.org; Thu, 27 Oct 2016 13:27:35 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzoSi-00007S-Di; Thu, 27 Oct 2016 13:27:32 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3292 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bzoSh-00009y-EE; Thu, 27 Oct 2016 13:27:32 -0400 In-reply-to: (message from Philipp Stephani on Tue, 25 Oct 2016 23:28:51 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:208880 Archived-At: > From: Philipp Stephani > Date: Tue, 25 Oct 2016 23:28:51 +0000 > > I've pushed the experimental branch to 'concurrency-libtask'. It's essentially a simple wrapper around libtask, > which implements CSP based on setcontext. I've also implemented a Windows equivalent based on > Windows native fibers, but haven't tried that yet. Thanks. Could you perhaps summarize the relative advantages and disadvantages of the two concurrency branches? Your branch doesn't have any documentation besides doc strings of the new primitives, so it's not easy to grasp the high-level picture by looking at the details. One issue that bothers me is whether it's wise to use libtask here, because the changes you did there seem to imply that we will have to maintain the library (which is pretty low-level stuff) as part of Emacs. Isn't using system threads better? (In any case, libtask shouldn't go under lib/, that directory is for Gnulib and related stuff. It should be a peer directory to lwlib, I think.) I'd also like to hear other people's opinions about the way communications with coroutines is exposed to Lisp, it seemed a bit tedious and low-level to me. As for Windows implementation, fibers are only available since XP, whereas the 32-bit build of Emacs on Windows still attempts to support older systems. So using threads here would be better, IMO.