From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 7EDCB3858D1E for ; Mon, 9 Jan 2023 16:20:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7EDCB3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x12c.google.com with SMTP id i17so233635ila.9 for ; Mon, 09 Jan 2023 08:20:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=08+UYjmQFMEpAlS0xlGZm5IBmYFX4FvrXL6ogL+pwfU=; b=Ld47OU39H8OgfG+an4jg8MB1eThfcDhOrW9Km5VP+NPkQl/MSSzgao/xp2PPOH90Ca p7uZ9NW4RgARwS+irp1OFHoWabF9Gtgx6l2rCEb+ahEdy8OW41nT3027ZwU7udSzmSN7 S4Q2+0J1bAnP7mULNVh3VmR8TkqWlDh8cynVUEjNSv9WLDj2iDYX04SjG1bf7z9ooFKU TgYyLaxEiWyGJ9/m+nV3XcM1SK3V9HoOJQiUZ5Us8a5LxyEbVw+zvqlwg2Zq+8rhw15/ rnvLGZiSMqDPi5cNYA31c+HSghWkM3jeaBvCCqAHYENX7hsFaW7AsL7+3BE82w0PBK2T 4Xgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=08+UYjmQFMEpAlS0xlGZm5IBmYFX4FvrXL6ogL+pwfU=; b=qRLvHw6dIPhDP0SLHuTxD4Ofy6CW0Mb2EtdtN2b0rs1eTwsiIVYmtkFSTgffOR5/+O NcKDEjaW4D5T4AlITGZy93LixXvYrvoyUKcO5EvY936i9RBBGIyvC30I9GNjZm6o694q PJgLQ22yCShLBzdhl9quFoNR/vJhhUz5B5hf8kQBrikSsEsJlJmeHZwWF7Udf70ZLQBa Tr+rkRhE3zHO2+V5SPKAaGgyKmyYCA1JIPNKa745+DCocNzZAeZdJWSoPrEvYCVLHtmU TeE28WeaolpmiL1rdciP0kt9/PiFGVXGLlt3Tu5wsA5mMM7ziZJA8KDn0D0zI4Cd/n1U kzvw== X-Gm-Message-State: AFqh2kqbXrJMwIke4pXYsg2/4pd7qT6+DxkPih+C6DSsx4966tKm7WVz J51UCWw0fFZuTkJwcOmyeCzpug== X-Google-Smtp-Source: AMrXdXuBmpA8PIqC2VKNGJHnrRHOplFhR4dbTGKs0nXuLKS/Hi3OSQPI1PHlt7hrju4HoJvsNH8SUg== X-Received: by 2002:a92:c690:0:b0:30b:8e9:103f with SMTP id o16-20020a92c690000000b0030b08e9103fmr38821972ilg.20.1673281257755; Mon, 09 Jan 2023 08:20:57 -0800 (PST) Received: from murgatroyd (97-122-76-186.hlrn.qwest.net. [97.122.76.186]) by smtp.gmail.com with ESMTPSA id w8-20020a056e0213e800b0030c2667fe17sm2855590ilj.80.2023.01.09.08.20.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Jan 2023 08:20:57 -0800 (PST) From: Tom Tromey To: Joel Brobecker Cc: Tom Tromey via Gdb-patches , Tom Tromey Subject: Re: [PATCH 1/4] Avoid submitting empty tasks in parallel_for_each References: <20221215190759.2494095-1-tromey@adacore.com> <20221215190759.2494095-2-tromey@adacore.com> X-Attribution: Tom Date: Mon, 09 Jan 2023 09:20:56 -0700 In-Reply-To: (Joel Brobecker's message of "Sat, 7 Jan 2023 15:19:41 +0400") Message-ID: <87o7r7adcn.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> "Joel" == Joel Brobecker writes: >> + /* We're about to dispatch the last batch of elements, which >> + we normally process in the main thread. So just truncate >> + the result list here. */ Joel> ... I'd expand the last sentence to explain that this is to avoid Joel> submitting empty tasks to the thread pool. Joel> But I'll leave it up to you do decide whether that's a useful suggestion Joel> or not ;-). Makes sense to me, I did this. Tom