From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: yyoncho Newsgroups: gmane.emacs.devel Subject: Re: "Asynchronous Requests from Emacs Dynamic Modules" Date: Sat, 31 Oct 2020 11:45:35 +0200 Message-ID: References: <86imarfldb.fsf@akirakyle.com> <86y2jn9j70.fsf@163.com> <83pn4y96ut.fsf@gnu.org> <83lffmhi5y.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a923fe05b2f460dd" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24735"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Zhu Zihao , ak@akirakyle.com, emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 31 10:47:27 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 1kYnTq-0006LN-W6 for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Oct 2020 10:47:26 +0100 Original-Received: from localhost ([::1]:49132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYnTq-0008TE-1I for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Oct 2020 05:47:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYnSM-0007xe-It for emacs-devel@gnu.org; Sat, 31 Oct 2020 05:45:54 -0400 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]:35949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYnSK-0007RG-3j; Sat, 31 Oct 2020 05:45:54 -0400 Original-Received: by mail-lf1-x131.google.com with SMTP id h6so11005039lfj.3; Sat, 31 Oct 2020 02:45:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VPv9S+0ekguVhB1a2SP6y4/ZemhPkTXfcTqzjPK1UCQ=; b=MurMLRAM3UwduVYPAnNyF+LY/4FFzZ3MvzboYC8g8r4Y/wEy7cfE9+1W7C27mdCgIr 41UWhGebildxdi6TaqQAjgRAGlm/MK6XbrzfAhxXPq7PD5p58zgW4iifdQVdFoUM76fd T2/KZDoeBlK6JNwwjAHtIGf4PWQ+DY6aOjy0ILHD97GszBwBD9uWY2gpQZQHYyuRrwSh pv/QV5fHkFaVUhgGhGJLCTuqLqBIGn55RLSLzDoI8kkUd07/bWNu/052/E4xkl4K3y+4 5YQIXzwDU1RtOSs6nRSA2aQKVCKfV7XAWs6DXDhWviGp7DtEUhdTRMWcU1ToAbJ4gC32 GslA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VPv9S+0ekguVhB1a2SP6y4/ZemhPkTXfcTqzjPK1UCQ=; b=tsTn+wecm/kVavEMkE5zVcCCrzDVybSyLJmHa6DlKYx+syky278ipYBwJqIRpsXe4+ 5Rh3TDuRchFcUx6S+a4XM3vf4mXjrT29//h9xdtD7/NKbU3kJX8WpWeymWCf9AJIR66y F1ge4RQW0cqkohJ4/K+GJ3LNb909n21af0KPDhyuQK+lRGpydIlrhES43+WMtmdTXHQq mNN996zaFfzL1PqzfQJQaHyILGIAv6DDSnNn1nB7FQfvnkF2v3iHUZixHlkMmTI3E7Yb hFNolAq4GrVqPrdS6mm+w1bxw4TwvYNju+8/wzSlkjuGvkl09eeZioaf3tZxV/pKQoew CgyQ== X-Gm-Message-State: AOAM530XuzBj3CJ64MZc+K3elsd635ro2A2e6S1/MXhhjD/dw83Qsb84 YHoGBVTQmueuGTyhrX4aaPGB8irgRYdQX2E+rN1Eg4Ib3XvYWA== X-Google-Smtp-Source: ABdhPJyP7LTJykWvXiEQ1k4RiHl/3wG9KzLBJJmf26/Ihq8kQ4fVOlt7Hu/siK01fD8FUNx5likVFxyBYiJXn/Gb67Q= X-Received: by 2002:a19:80cd:: with SMTP id b196mr2677499lfd.118.1604137547013; Sat, 31 Oct 2020 02:45:47 -0700 (PDT) In-Reply-To: <83lffmhi5y.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=yyoncho@gmail.com; helo=mail-lf1-x131.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:258578 Archived-At: --000000000000a923fe05b2f460dd Content-Type: text/plain; charset="UTF-8" That is unfortunate. I was assuming that at least thread primitives can be made thread-safe. On Sat, Oct 31, 2020 at 11:14 AM Eli Zaretskii wrote: > > From: yyoncho > > Date: Sat, 31 Oct 2020 10:02:41 +0200 > > Cc: Zhu Zihao , ak@akirakyle.com, > > emacs-devel > > > > Allowing condition-notify call from non-elisp threads would solve the > problem as well. > > I don't see how that could be possible without redesigning the entire > Lisp threads machinery. > > In general, no part of the Lisp interpreter -- and that includes the > Lisp thread related functions -- can ever safely run from an async > non-Lisp thread. > --000000000000a923fe05b2f460dd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That is unfortunate. I was assuming that at least thread p= rimitives can be made thread-safe.=C2=A0

On Sat, Oct 31, 2020 at 11:14 AM El= i Zaretskii <eliz@gnu.= org> wrote:
> From: yyoncho <yyoncho@gmail.com>
> Date: Sat, 31 Oct 2020 10:02:41 +0200
> Cc: Zhu Zihao <all_but_last@163.com>, ak@akirakyle.com,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0emacs-devel <emacs-devel@gnu.org>
>
> Allowing condition-notify call from non-elisp threads would solve the = problem as well.

I don't see how that could be possible without redesigning the entire Lisp threads machinery.

In general, no part of the Lisp interpreter -- and that includes the
Lisp thread related functions -- can ever safely run from an async
non-Lisp thread.
--000000000000a923fe05b2f460dd--