From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yA6IFGD6nGDhngAAgWs5BA (envelope-from ) for ; Thu, 13 May 2021 12:07:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4BwgEGD6nGBXbwAAbx9fmQ (envelope-from ) for ; Thu, 13 May 2021 10:07:28 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 11E772FBF3 for ; Thu, 13 May 2021 12:07:27 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 6847827185; Thu, 13 May 2021 06:07:20 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 0B6D327185 for ; Thu, 13 May 2021 06:07:16 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 273A260018; Thu, 13 May 2021 06:07:15 -0400 (EDT) Received: (nullmailer pid 1460726 invoked by uid 1000); Thu, 13 May 2021 10:07:13 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: static variable cleanup Date: Thu, 13 May 2021 07:07:03 -0300 Message-Id: <20210513100710.1460566-1-david@tethera.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Message-ID-Hash: TVK7ZPDQ4SMNSFZFI4TBIW7FS2W7ZRLG X-Message-ID-Hash: TVK7ZPDQ4SMNSFZFI4TBIW7FS2W7ZRLG X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620900448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fTaQZ/45aF+adndk3Rc+hlQUmf2NKXY8IudZ8L6q9+g=; b=WDMH66G22DSTJEYzMN1Xd3LFvTdc7imwOR6xM+d/iABVgie4m/ftSeART313X+PCvFe7KA TWL4Qu1S8JCxmgT8HM3GI5jT9G0+sobSuxP20tKBIaQmmScSQYnFnsppzrgl0hyauJa4B8 CElQ3VvAefPChBtHaF+iv1vC7wIhtH9hVJ7znASr7HBQiwsPu8jT0jHgbEn2Hb+3PXSqXG oPwnCAlc5w3MHAOv49uVZUjjOmgdnu4RUcBAamvuu7HND4lneL3mv6kLaQsC92kE7WRt+w evtYfLm9NQ8qCPg+TfLdQfxrfUD5AljGlbmCTB5ySorlr2/hAu3OXnc3nfz6Vg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620900448; a=rsa-sha256; cv=none; b=nePqbJ1/un7PnoQ9sWscmsuiCA9W+gzTn6MUaf6bMQ0Ks05tvyQS8Xq9ZYKR5bUmYPXytT E9/SaYYg5fP+JkF6wSA8jidrmbp4zi3tO4/B43YIf3rN3EZmfMqOF8ZRG7vEfSD+tmLvHO 3sf4Gowv6fyMhsnlNMNQi5G8QaEMf7uiwXytxTeKU+Yp9GHDjg6E+G6ZZDc/mzjUieGhlD rCqxVDjcpqCHtqRBMVzxwGqGMWUHkXlQpHM9lGLY6GkpaQB3cu5B9Q7Ks74F6EPK6B46uG F4+0tnuI0fQzdqahTzIXhazlxSsBz7CVDQo3JJAQgSpHfVXHIaBhDWdTxeu+4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.46 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 11E772FBF3 X-Spam-Score: 0.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: bjMW6jt0QNoU Both the library and the CLI use a fair amount of static variables. These are an obvious blocker for any kind of thread-safety, even the limited goal of concurrently opening two databases for reading in the same process. This series cleans up some of the low-hanging fruit.