From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#53877: 29.0.50; [PATCH] async Gnus/nnml Date: Thu, 10 Feb 2022 12:37:40 -0800 Message-ID: <87sfsq8nl7.fsf@ericabrahamsen.net> References: <87leyl1lr9.fsf@elite.giraud> <87bkzgpi9u.fsf@gnus.org> <87tud8cr5q.fsf@elite.giraud> <878rukmkpf.fsf@gnus.org> <87k0e4cojb.fsf@elite.giraud> <87v8xol3tr.fsf@gnus.org> <877da4cjdg.fsf@elite.giraud> <87o83gq9q5.fsf@ericabrahamsen.net> <87o83faybg.fsf@elite.giraud> <87iltma8wj.fsf@ericabrahamsen.net> <837da2tqof.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33296"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 53877@debbugs.gnu.org, larsi@gnus.org, manuel@ledu-giraud.fr To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 10 21:38:32 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nIGD0-0008SZ-Ao for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 21:38:30 +0100 Original-Received: from localhost ([::1]:45638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIGCy-00066j-Rb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Feb 2022 15:38:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIGCY-00065W-Qy for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 15:38:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35162) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nIGCY-0005u7-Gt for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 15:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nIGCY-000340-FQ for bug-gnu-emacs@gnu.org; Thu, 10 Feb 2022 15:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Feb 2022 20:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53877 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 53877-submit@debbugs.gnu.org id=B53877.164452546911738 (code B ref 53877); Thu, 10 Feb 2022 20:38:02 +0000 Original-Received: (at 53877) by debbugs.gnu.org; 10 Feb 2022 20:37:49 +0000 Original-Received: from localhost ([127.0.0.1]:57290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGCL-00033G-3K for submit@debbugs.gnu.org; Thu, 10 Feb 2022 15:37:49 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:51608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nIGCK-000332-1H for 53877@debbugs.gnu.org; Thu, 10 Feb 2022 15:37:48 -0500 Original-Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 094FCFA08F; Thu, 10 Feb 2022 20:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1644525462; bh=uNJOS14U3Sz3f7izxx69cIkJHp3uw3j+oEYuHDqSBlc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=PwjtUXYTz+YxGvNppP/cawux+e+AkfP8u87saxl+mInT88odnYNV7T7CWJAFOiOgM 3rZ/vg5jpz8rzfOXXtY2eZdjSf/gdIRQVol5yWZp+GT8l3Sv4pvlwEX52QVbNQlWBB eJx+kU8IxC4b+oj9zxEdpDHfDRK5DmS3dP0+HQvo= In-Reply-To: <837da2tqof.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 10 Feb 2022 22:25:20 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226631 Archived-At: Eli Zaretskii writes: >> From: Eric Abrahamsen >> Date: Thu, 10 Feb 2022 10:11:56 -0800 >> Cc: 53877@debbugs.gnu.org, Lars Ingebrigtsen >> >> >> (defun test-threads-outer () >> (dolist (label (list "one" "two" "three")) >> (make-thread (lambda () (test-threads-inner label)) label))) >> >> (defun test-threads-inner (label) >> (let ((nnmail-article-buffer (format "nnmail-incoming-%s" label))) >> (with-current-buffer (get-buffer-create nnmail-article-buffer) >> (insert label)))) >> >> That creates three separate buffers, named correctly, and holding the >> correct text. > > But only if you don't do anything in the main thread, just let it sit > idling. Right? Otherwise those other threads won't get an > opportunity to run. Sure, in real life we'd be yielding to these threads and joining afterwards before going on with the rest of the code. This example was just to show that having different locally-bound values for `nnmail-article-buffer' in each thread was a viable approach.