From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLACK shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 3C3D91F54E for ; Tue, 6 Sep 2022 22:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229662AbiIFWwl convert rfc822-to-8bit (ORCPT ); Tue, 6 Sep 2022 18:52:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbiIFWwj (ORCPT ); Tue, 6 Sep 2022 18:52:39 -0400 Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E4C386063 for ; Tue, 6 Sep 2022 15:52:38 -0700 (PDT) Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-3452214cec6so69140757b3.1 for ; Tue, 06 Sep 2022 15:52:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=++/14MdZtlp310BhanpxQw90unjE8fsik3sUoA3UaAU=; b=XAPMCJbkITZRHIgCODkz2Fj/bNOD6P5jloKXL+y86VGzrSeG3/JhUF2EkkMis7LJH+ gwixjqdUS2DRp+lJ4NOOKSEgNfWKOIMbYqfhi1BcRes+Hz7LK22mfWpHGlfHzdT9+g8K 626WjHUDQvwHHCqauGkrV1X1jV/5uwG5rTeHjt8KFXN4QRAe/GZcetGjwaF+GgnYU1wb gZ/iJS72k/CNCPQazdzx0v8tqjH+JOlP/zMs4vkSbykgX0R8SQB7+cS/x0U/KgxRd5gn exkBYf2aASqeFpuS3tIuJItRlAhOY2k1p8mftpni5fEcSdBdEIYPr8SzyXezHqbfWwSQ pj8A== X-Gm-Message-State: ACgBeo2155NDpWb3sD/sLyXUMc/5KVPyjSB7I9zlJxpQ/CdvnLHt3zl+ pMKtCh4HXOK7R54Kcp81ugb9evtmvk9ROpTGjY0= X-Google-Smtp-Source: AA6agR6V5FHCnK8SGOuI/BOVu2xzZu/lJ7FOujmKuWI/8DvDZqv8GG/NLkycdRoqeqBLqrXuXOAtdNFJrNY1QkX9/Fw= X-Received: by 2002:a0d:c307:0:b0:335:6fff:dc70 with SMTP id f7-20020a0dc307000000b003356fffdc70mr732226ywd.493.1662504757632; Tue, 06 Sep 2022 15:52:37 -0700 (PDT) MIME-Version: 1.0 References: <62fc652eb47a4df83d88a197e376f28dbbab3b52.1661992197.git.gitgitgadget@gmail.com> <20220906223537.M956576@dcvr> In-Reply-To: <20220906223537.M956576@dcvr> From: Eric Sunshine Date: Tue, 6 Sep 2022 18:52:26 -0400 Message-ID: Subject: Re: [PATCH 06/18] chainlint.pl: validate test scripts in parallel To: Eric Wong Cc: Eric Sunshine via GitGitGadget , Git List , Jeff King , Elijah Newren , =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= , Fabian Stelzer , Johannes Schindelin Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Sep 6, 2022 at 6:35 PM Eric Wong wrote: > Eric Sunshine via GitGitGadget wrote: > > +unless ($Config{useithreads} && eval { > > + require threads; threads->import(); > > Fwiw, the threads(3perl) manpage has this since 2014: > > The use of interpreter-based threads in perl is officially discouraged. Thanks for pointing this out. I did see that, but as no better alternative was offered, and since I did want this to work on Windows, I went with it. > I was bummed, too :< but I've decided it wasn't worth the > effort to deal with the problems threads could cause down the > line in future Perl versions. For example, common libraries > like File::Temp will chdir behind-the-scenes which is > thread-unsafe. > > (of course I only care about *BSD and Linux on MMU hardware, > so I use SOCK_SEQPACKET and fork() freely :>) I'm not overly worried about the deprecation at the moment since (1) chainlint.pl isn't a widely used script -- it's audience is very narrow; (2) the `$Config{useithreads}` conditional can be seen as an automatic escape-hatch, and (if need be) I can even make `--jobs=1` be an explicit escape hatch, and there's already --no-chain-lint for an extreme escape-hatch; (3) the script is pretty much standalone -- it doesn't rely upon any libraries like File::Temp or others; (4) Ævar has ideas for using the Makefile for parallelism instead; (5) we can cross the deprecation-bridge when/if it actually does become a problem, either by dropping parallelism from chainlint.pl or by dropping chainlint.pl itself.