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: Tue, 04 Jul 2023 20:35:16 +0300 Message-ID: <83r0pnk2az.fsf@gnu.org> References: <871qhnr4ty.fsf@localhost> <83v8ezk3cj.fsf@gnu.org> <87v8ezpov0.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21207"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jul 04 19:36:21 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 1qGjwr-0005IR-4e for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Jul 2023 19:36:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGjw5-00072G-Ea; Tue, 04 Jul 2023 13:35:33 -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 1qGjw3-000724-Pg for emacs-devel@gnu.org; Tue, 04 Jul 2023 13:35:31 -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 1qGjw3-0006wZ-6h; Tue, 04 Jul 2023 13:35:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ALnPKyHJFXA8fn1BaKA4TSDcoerOCTpt6JB0gHAAIk8=; b=hDHq2KSo3/ErG08/N7ko KbKl8YjD3v8/zxmzwacDM9NrXWqqHtnJZ/5NPcwojZE06Sv3qfXfsN1D3f5oZpuWKXIoLn+iNsTL7 XzIfLVJGtE8W+KREUWYxI4t5JIantyp7Nxwch/XBLtfS08fEfTIpnFo/JtPSff/AT+x9Kms0AlQIX ng+eH++W9db1dOlhlgxEobs/qPJIocKB8yngOayP6DeNV8agFD3SKiIoWNhjbPKef296QPaqyigPF AjHk/8axn6qnMO07A2aEYoNBpWAZ4TMICxVsXVVhdbsAh31atSFKPY9cNN51BNO3cUG45re0qgtds PQ/QOSnitxjYNA==; 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 1qGjvs-0002w0-6d; Tue, 04 Jul 2023 13:35:29 -0400 In-Reply-To: <87v8ezpov0.fsf@localhost> (message from Ihor Radchenko on Tue, 04 Jul 2023 17:29:07 +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:307437 Archived-At: > From: Ihor Radchenko > Cc: emacs-devel@gnu.org > Date: Tue, 04 Jul 2023 17:29:07 +0000 > > > This is software: anything's possible ;-). But Someoneā„¢ needs to > > write the code, like marshalling and unmarshalling of such objects > > between two processes. (We do something like that when we write then > > load the pdumper file.) There's more than one way of skinning this > > particular cat. > > As the first step, I wanted to hear if there is any blocker that > prevents memcpy between processes without going through print/read. I don't think you can design on this base. Security and all that. Also, complex structures include pointers and references, which you cannot safely copy as-is anyway. > >> The inter-process communication does not have to be asynchronous, but > >> may work similar to the existing thread implementation. > > > > I wouldn't recommend designing anything by the example of Lisp > > threads. 'Nough said. > > IMHO, the main problem with threads is that they cannot be interrupted > or fire too frequently. I wish this were the only problem with threads.