From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Concurrency via isolated process/thread Date: Sat, 08 Jul 2023 10:45:47 +0300 Message-ID: <83zg46dexg.fsf@gnu.org> References: <871qhnr4ty.fsf@localhost> <87sfa28ura.fsf@localhost> <87cz16o8vz.fsf@yahoo.com> <87jzve8r4m.fsf@localhost> <871qhmo5nv.fsf@yahoo.com> <87bkgq8p5t.fsf@localhost> <831qhmjwk0.fsf@gnu.org> <875y6y8nlr.fsf@localhost> <87h6qhnalc.fsf@yahoo.com> <87ilax71wo.fsf@localhost> <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> <835y6uex7z.fsf@gnu.org> <87zg46aowt.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39709"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jul 08 09:46:37 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 1qI2eK-000A7j-Dr for ged-emacs-devel@m.gmane-mx.org; Sat, 08 Jul 2023 09:46:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qI2dY-00081Z-71; Sat, 08 Jul 2023 03:45:48 -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 1qI2dW-0007yQ-7M for emacs-devel@gnu.org; Sat, 08 Jul 2023 03:45:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qI2dV-00026i-KD; Sat, 08 Jul 2023 03:45:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=CB4carr9KzLTGJEcuL2iSGxyJyqK+DojAKNuBDVx/UY=; b=kLsCGdmXVExF NVZs8s0WE/j2W68fo+xovBJlxXtbpLhk9LlXO5op0yTc7pMnsgunLZvOHv65OE4zTtKb0V0AZWEHB I7mg9kv3UEQgnrSXqG76nzbqx7xs63RmL/5EoRqBx1LeJohkIlgxkWpyI0QyWNYihkityDQ9r+/Yb uF6DMAKQG0WYfOv1+o+uW4B/J4nln16GW/7YAkeDby6RVcCSDXTiyKQq/KE2GT0KeUA70vDYZagJ/ GRFKf6qh6M6c1UEAyRDDR85+MtUaMcKqFPxsk0qoijndZaZSQ9jAbtsnwDucEXor6KUnGtIdWqnWn /qGIYrVQWqL/GxA5QChaog==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qI2dU-0002hv-Pt; Sat, 08 Jul 2023 03:45:45 -0400 In-Reply-To: <87zg46aowt.fsf@localhost> (message from Ihor Radchenko on Sat, 08 Jul 2023 06:38:26 +0000) 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:307601 Archived-At: > From: Ihor Radchenko > Cc: Po Lu , emacs-devel@gnu.org > Date: Sat, 08 Jul 2023 06:38:26 +0000 > > Eli Zaretskii writes: > > > .... I thought this discussion was about less > > painful implementations. > > My idea with isolated thread is similar to having a bunch of state > variables coped to the thread before executing it. Interlocking will > still be necessary if the isolated thread wants to do anything with the > actual global state (like buffer modification, for example). How would we know which part(s) of the global state to copy, and how will the Lisp program running in the thread know which variables it can safely access? If I am the Lisp programmer writing code for such a thread, how can I know what is and what isn't allowed? And what happens if I do something that is not allowed? And finally, does it mean we cannot run existing Lisp programs in such threads, but must program for them from scratch?