From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.devel Subject: Re: async Gnus Date: Wed, 26 Jan 2022 10:32:26 -0500 Message-ID: References: <87a6flqddp.fsf@elite.giraud> <87fspbzpu5.fsf@ericabrahamsen.net> <87wnimn760.fsf@elite.giraud> <83ee4uhccg.fsf@gnu.org> <871r0umtm1.fsf@elite.giraud> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17880"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: eric@ericabrahamsen.net, Eli Zaretskii , emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 26 16:34:45 2022 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 1nCkJp-0004R9-Gc for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jan 2022 16:34:45 +0100 Original-Received: from localhost ([::1]:34860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCkJn-00083R-WB for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Jan 2022 10:34:44 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCkHv-00068e-TQ for emacs-devel@gnu.org; Wed, 26 Jan 2022 10:32:47 -0500 Original-Received: from [2607:f8b0:4864:20::f2e] (port=38756 helo=mail-qv1-xf2e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nCkHp-0002y4-LU for emacs-devel@gnu.org; Wed, 26 Jan 2022 10:32:47 -0500 Original-Received: by mail-qv1-xf2e.google.com with SMTP id b12so125008qvz.5 for ; Wed, 26 Jan 2022 07:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fitzsim-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=yZHwYDkMDLRaRxy4tO5BtaIold/evfWceZt4Wn4yvCM=; b=CpwGnZRViZ+omM7qbcJ1pRahQi/lLBE/Nzc4Regha8OV6dFJ/6qPZFmIbvLCe616nw qQmlORjYBZMhMZ7vIJn5sxqlZTebrL/5zIaq9tl5RLsNSM1n7UdyV+Q62n4G6/h8jt8c BKQB7UvfmCaZmxkVAMUNPEw/Oz9D3qBoo1no/lpy0xDQg99cxSsFk8G+jFcwZwuVxB28 HZc9c12m16NEBnmXDjsVGGeJBbe5Wijm3BzwRCiykxBOGF5N/g0DJmG2QC1XMPsfTAzQ Cb58J9AAtd88H2+BoDG6tYF+FzUWnuNStg6EYEXixJFfLN+XOi65Fyf/N2LHzn6e93gB Ruuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=yZHwYDkMDLRaRxy4tO5BtaIold/evfWceZt4Wn4yvCM=; b=r2ar5LAcRl6LabtXsl7LnKLz6l6Ew64rgQVayPtCBDG3J5FMoYPl7SjZX18HmaNj2Y gs+layN0997m63q6Of5rpj7aUj/Nf6BckrCiy3rbDtpwT1Q3dQgy2zHxXgXeJkjoIOyn S7yHgK0MZRhQwYGHvZrFwWorAqlGzfLfoePptCKGDuK2rWpmKEYX+jdowwG1h+8uZx9I M9Fe1151vvvEmon+ymAGctLnmn5m9EXsY+VVDWMddYQyAjeBJULVXgdn7dNTTGMFf6Bj J9pqvz8bn5+eX4Oxs9FgLXuZ6hjaGtPw9sSH2JM3lwbWa465ecDPHjTte4ettZ9x5bO3 ijgA== X-Gm-Message-State: AOAM531dvGnrj1pZeq1/f5ynDBjzN3v6GCkpILBA4wMn9L+nZnDxgxfy Hks6i+Nw9ul6SkJ2Hs1f3gzUT6Vqta/OeRoa X-Google-Smtp-Source: ABdhPJzpGj1MRG3iED+2KNFFe4n9f2T5umXK3tAVNu77BnMYxLUPJioxsAaFbPeC/weRcrsnGoDbDQ== X-Received: by 2002:ad4:5fc8:: with SMTP id jq8mr4732890qvb.33.1643211147888; Wed, 26 Jan 2022 07:32:27 -0800 (PST) Original-Received: from localhost.localdomain (69-165-165-189.dsl.teksavvy.com. [69.165.165.189]) by smtp.gmail.com with ESMTPSA id r2sm6220267qtu.57.2022.01.26.07.32.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jan 2022 07:32:27 -0800 (PST) In-Reply-To: <871r0umtm1.fsf@elite.giraud> (Manuel Giraud's message of "Wed, 26 Jan 2022 15:58:30 +0100") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::f2e (failed) Received-SPF: none client-ip=2607:f8b0:4864:20::f2e; envelope-from=fitzsim@fitzsim.org; helo=mail-qv1-xf2e.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:285434 Archived-At: Hi Manuel, Manuel Giraud writes: > Eli Zaretskii writes: > >>> From: Manuel Giraud >>> Date: Wed, 26 Jan 2022 11:05:43 +0100 >>> Cc: emacs-devel@gnu.org >>>=20 >>> I'm suprprise: I thought that `make-thread' create a proper system >>> thread. >> >> It does. But we only let a single thread at a time to run the Lisp >> interpreter. So if your thread runs a lot of Lisp, it will preempt >> the main thread, and that means unresponsive Emacs. > > Ok so, as Python, Emacs has a GIL. As Gnus seems to be an heavy user of > Lisp maybe my goal is inaccessible=E2=80=A6 I'll try to see what I end up= with > anyway =F0=9F=98=85 Bug 49065 has a huge patch that, among other things, introduces a background thread for gnus-group-get-new-news. It was never accepted because the author didn't break the larger patch into smaller chunks for review. Maybe you could start from that large patch, confirm the asynchronous changes work for you, then separate out the background-thread parts to submit. Thomas