From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: Concurrency via isolated process/thread Date: Sat, 8 Jul 2023 06:18:31 +0200 Message-ID: References: <831qhli14t.fsf@gnu.org> <87wmzdxewc.fsf@localhost> <83r0plgjeo.fsf@gnu.org> <87o7kpxapo.fsf@localhost> <83mt09gcaf.fsf@gnu.org> <87wmzbc3af.fsf@localhost> <83cz13g811.fsf@gnu.org> <87lefrbvjw.fsf@localhost> <83h6qfecxt.fsf@gnu.org> <87ttuffcnv.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vsi4ukdwk4SkCXsL" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37225"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 08 06:19:25 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHzPp-0009Tp-6S for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jul 2023 06:19:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHzP9-0004Hk-2Q; Sat, 08 Jul 2023 00:18:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHzP6-0004HN-VZ for emacs-devel@gnu.org; Sat, 08 Jul 2023 00:18:40 -0400 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHzP0-0000rB-M4 for emacs-devel@gnu.org; Sat, 08 Jul 2023 00:18:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=YSJwtArMs/OcGXWrh8yHbWAdy4xDr+MDM1ckJ06sNLg=; b=WeKtq1ZyDtKr8Zqu2D6tdE6I16 4hWgEzgsTAZduxjsLK5jy5H1udQXRKzN2VmmtlOw+fZ/a0OXxKnKzg3037LldY2LwryapejUh1lzH 12LoLACs1fQkCyzOigsrlShFn9g0YzrrnQ1+gW8cBkKtCOJOPaLCzDvBByFkVr35PzubFw3hNOfr9 79Rk/i8kScnwmV8EppEp2SK8yRAK/0oWjs8wsnQ5sGkVOzEhgeLD7zs1zfdOhQ3GlJkhp8rq+SKVf yyL15E8QX6Nj6SSv/uG36dro0uytOLhD0hQj9m/7IqfM/kdqwAmec5301p+cZEplMe6tC8GjaAJFU YyPzAl8w==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1qHzOx-0006Ps-Az for emacs-devel@gnu.org; Sat, 08 Jul 2023 06:18:31 +0200 Content-Disposition: inline In-Reply-To: <87ttuffcnv.fsf@yahoo.com> Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307591 Archived-At: --vsi4ukdwk4SkCXsL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 08, 2023 at 08:51:48AM +0800, Po Lu wrote: > Eli Zaretskii writes: >=20 > > Programs that use async threads avoid global variables like the > > plague. Emacs is full of them. >=20 > That's not true. Look at any modern Unix kernel, and their detailed > locking around traditional Unix data structures, such as allproc, the > run queue, the vnode cache, and et cetera. The tendency, though, seems to be to avoid interlocking as much as possible and use "transactional" data structures [1]. Which is an order of magnitude more "interesting" :-) But this is a kernel. I have the impression that this discussion has explod= ed in scope, from taking the blocking out of "long" (network, external procs) waits to fine-grained parallelism and multithreading. I think the first makes sense in Emacs, the second... not so much. But that= 's just one random opinion :-) Cheers [1] https://mirrors.edge.kernel.org/pub/linux/kernel/people/paulmck/perfboo= k/perfbook.html --=20 t --vsi4ukdwk4SkCXsL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCZKjjjwAKCRAFyCz1etHa RobXAJ9SWw4E2We5PfS8LvujhZdUPdIyLQCdEX2rQqcUXADcP20aKLOOa0nuSCU= =B+NM -----END PGP SIGNATURE----- --vsi4ukdwk4SkCXsL--