From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: "Asynchronous Requests from Emacs Dynamic Modules" Date: Fri, 30 Oct 2020 18:39:55 -0400 Message-ID: References: <86imarfldb.fsf@akirakyle.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23981"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Akira Kyle Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 30 23:41:16 2020 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 1kYd5A-00066a-15 for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Oct 2020 23:41:16 +0100 Original-Received: from localhost ([::1]:59350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYd58-0002P1-Vy for ged-emacs-devel@m.gmane-mx.org; Fri, 30 Oct 2020 18:41:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYd3y-0001hi-Sp for emacs-devel@gnu.org; Fri, 30 Oct 2020 18:40:02 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:27633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYd3w-0007qf-Hx for emacs-devel@gnu.org; Fri, 30 Oct 2020 18:40:01 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id F1C1A1002FA; Fri, 30 Oct 2020 18:39:58 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2EC6D10025D; Fri, 30 Oct 2020 18:39:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1604097597; bh=6fCA4X9elDmsvYLNbHyHxQjottyBZwGwRyQjsZxnOFE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Q8P2as4nWZ4SCMfcMgGXe6bkmeV7iBAXUp9kobWICcgq/MXaqvLbzTPd+P11+6MUL QJ5y8qfkW72tv5mJAFiRcpOVdieYerkC0dbSPh4PL7kzPXW9dw2WvfcOarfS+1s7D1 xHL63dg4UkYFwcWLtLmd1ma9HcQRhEtX4royljjFuXKIHzcSmPlIUVaguzH6PQesVp tabFZWFOpwOw9NMHLRASauipljbkRsykQkjmj6MMFers17Ibg0gPEknuhCji8P78WQ Gh3OGrrTMm1uVdztKsdd0dGcXqli1qNPq4qjmKDOyCL1ZY1WVL2s6G+LzqC6p8BTf/ umyqEFa+lebWw== Original-Received: from alfajor (unknown [157.52.9.240]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 002A51202A4; Fri, 30 Oct 2020 18:39:56 -0400 (EDT) In-Reply-To: <86imarfldb.fsf@akirakyle.com> (Akira Kyle's message of "Fri, 30 Oct 2020 15:35:12 -0600") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/30 18:21:38 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:258567 Archived-At: > Does anyone know of the best way to handle this? > Perhaps the module interface should be expanded to handle this situation? Most likely, we need some way for a module to "raise a flag" which then causes the main Lisp thread to get back to the module. Maybe the best way to do that is for the module to create a ELisp "process" object with a corresponding file handle (probably a fifo, with one end used by the ELisp process object and the other end used by the module), so when the module needs to run an async request, it would write to the fifo, and then the process's `process-filter` would call the module back to actually process the async request. Stefan