From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Concurrency, again Date: Tue, 18 Oct 2016 03:58:04 -0400 Message-ID: <7D150317-7A01-464D-8352-942631A3116B@raeburn.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> <874m4aic0g.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1476777521 18402 195.159.176.226 (18 Oct 2016 07:58:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Oct 2016 07:58:41 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 18 09:58:36 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 1bwPHu-00020s-Om for ged-emacs-devel@m.gmane.org; Tue, 18 Oct 2016 09:58:18 +0200 Original-Received: from localhost ([::1]:39416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwPHw-0004WX-PN for ged-emacs-devel@m.gmane.org; Tue, 18 Oct 2016 03:58:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwPHo-0004WF-0f for emacs-devel@gnu.org; Tue, 18 Oct 2016 03:58:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwPHj-00068i-Sg for emacs-devel@gnu.org; Tue, 18 Oct 2016 03:58:12 -0400 Original-Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:34431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwPHj-00068a-Mq for emacs-devel@gnu.org; Tue, 18 Oct 2016 03:58:07 -0400 Original-Received: by mail-qt0-x229.google.com with SMTP id q7so145188578qtq.1 for ; Tue, 18 Oct 2016 00:58:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b9497hFmkn96t7mrwwBqTG9ZY9A2Zjx3vuP5oFyGSGc=; b=ghZMSzhtUvFZZnCJa86KkfkbMe2QItYwYHRQ1T4Prsykn4mbWDZ8kY1u3qpQLG6UH7 GrADhq6+SXOSz8M8OTUO9eMaL7ldw95Oov4m5AqCnHbfvyW0GVbEi8rHURonrCNxc6GF 2eQbD/XsieCyAXD06Wm/AVkc45W86vTJKu3w1IGna5+hm6LWVMgdRQBwvzP9tw9uuEuW 72pqvNKzKlkGaKyFFnSRismkiuq/KnOdHMJh4Cm1dhPtRkWOB7Wtmp/aWwLxpfnaKiUa N3aFab1hQU/j9Sc9x+6GlJYzbGpo0OlQXcosvqYKGLpyfflr7VCVjwMYCYPJnWNpVBaR BuGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b9497hFmkn96t7mrwwBqTG9ZY9A2Zjx3vuP5oFyGSGc=; b=IF6vcaw+otRjtYNs9Yx+daf6tK8xWUGCZ4KjF2x+hNdBqKGQ3PVxG5rh7Rm/0BpUpZ lczbhZmAXkhFvejOmoArswweEYdtg+uXAOO9JSimsFKNJlrPSBiMJAzFZj+ac9whqBdB rwv+6e5JGOOfw0bOscwPIZIlNhFk8TrN6xMEuEbBg7/UG17DZyErNcBGyO/mb0Kc9VOl JAS7LQ/wpyuYdPpez1tAxuA+bn+iOSDQhJe2Nlb4o7/7fSiGVmi0n2VKWphQM0I97fJY l4X6tB2mZxoYT4mps5oq2k3uYI5N0f1kp3AhJItU6reBRZnLfisVcJ9xD2YPaJa281+L RNiQ== X-Gm-Message-State: AA6/9Rn1X2A9Zya26cA2N+zTrpZtfY1FBrtNXt2ikcDo8Me/zmqW4upFfDmYePXlgtAqHQ== X-Received: by 10.237.44.193 with SMTP id g59mr1351002qtd.144.1476777486957; Tue, 18 Oct 2016 00:58:06 -0700 (PDT) Original-Received: from [192.168.23.52] (c-50-138-183-136.hsd1.ma.comcast.net. [50.138.183.136]) by smtp.gmail.com with ESMTPSA id v10sm17341731qkg.20.2016.10.18.00.58.05 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Oct 2016 00:58:05 -0700 (PDT) In-Reply-To: <874m4aic0g.fsf@tromey.com> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::229 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:208393 Archived-At: > On Oct 17, 2016, at 23:14, Tom Tromey wrote: >=20 >>>>>> "John" =3D=3D John Wiegley writes: >=20 > John> Tom, if I can find some volunteers to help, would you be willing > John> to see the work of merging this into master through to = completion? >=20 > I can help to some degree, but I definitely can't do it all myself. >=20 > There are two main issues. >=20 > First, it has to be rebased. There have been a lot of changes since = it > was written -- I tried a rebase last year but it was pretty painful, I > think I stopped while fixing up the process changes. I=E2=80=99ve recently been looking at doing another merge, actually. = And yeah, process.c is the piece I haven=E2=80=99t finished. > The branch is also > kind of messy, since I think I mostly didn't write ChangeLogs and = there > have been several merges from master. So I suppose it would need some > cleanups as well. Yeah, the lack of documentation on specifics made my last merge (about a = year ago) challenging. In fact, in order to get a better understanding = of it, I set up a private repository where I broke up the concurrency = branch changes =E2=80=94 not each commit, but the overall diff from the = branch point =E2=80=94 into little pieces, separating straightforward = but pervasive changes from more subtle changes so I could figure out = what the latter were doing. The result of my merge that I checked in = was in fact the result of rebasing those little changes onto the latest = master branch, fixing them up as necessary as I went along. (But the = resulting body of code was checked in as a merge commit so as to = preserve history of the work on the branch =E2=80=94 what change was put = in, who fixed what bugs, etc; I wasn=E2=80=99t about to unilaterally = throw that away. It was just a slow, tedious, manual merge process = instead of an automated one.) > Second, last time this was discussed there were a reasonably large > number of comments on features that had to be done in order to merge. = I > haven't worked on any of those. I collected some notes from those past discussions, though it was often = unclear whether there was consensus on certain things being needed or = whether they were just ideas being kicked around. My list, aside from = the note to go back and review the discussions again :-) =E2=80=A6 * collapse systhread and thread, adding w32threads.c to emulate the = pthread interface * header inclusion order requirement is weird; can generating one big = header help? * field names and faking globals with macros: maybe change m_ prefix, = maybe add BVAR-like macro * one thread per terminal? * file notifications and such shouldn=E2=80=99t go through same queue = as keyboard events * interaction of SIGCHLD handling and threads? * handle errors in lower-level routines like sys_cond_init * ns_select needs fixing There are also uses of jmp_buf in places that should be examined = carefully, like stack overflow handling, keyboard.c:getcjmp, and image = handling code. Ken=