From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:39984) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDapv-0006CC-Do for guix-patches@gnu.org; Thu, 26 Sep 2019 16:58:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDapu-0007KS-E9 for guix-patches@gnu.org; Thu, 26 Sep 2019 16:58:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36569) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDapu-0007K3-Az for guix-patches@gnu.org; Thu, 26 Sep 2019 16:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iDapu-0006gF-9J for guix-patches@gnu.org; Thu, 26 Sep 2019 16:58:02 -0400 Subject: [bug#37510] [PATCH 1/1] compile: Fix race condition on completion progress. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190925020706.6034-1-ericbavier@centurylink.net> <87pnjnpfsz.fsf@gnu.org> <58295170.37303056.1569505365844.JavaMail.zimbra@centurylink.net> Date: Thu, 26 Sep 2019 22:57:48 +0200 In-Reply-To: <58295170.37303056.1569505365844.JavaMail.zimbra@centurylink.net> (Eric Bavier's message of "Thu, 26 Sep 2019 09:42:45 -0400 (EDT)") Message-ID: <87tv8yixmb.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Eric Bavier Cc: 37510@debbugs.gnu.org, bavier Eric Bavier skribis: >>> +++ b/guix/build/compile.scm >>> @@ -173,7 +173,8 @@ files are for HOST, a GNU triplet such as >>> \"x86_64-linux-gnu\"." >>>=20=20 >>> (define (build file) >>> (with-mutex progress-lock >>> - (report-compilation file total completed)) >>> + (report-compilation file total completed) >>> + (set! completed (+ 1 completed))) >>=20 >> Here =E2=80=98completed=E2=80=99 is incremented before the thing is even= started. > > Maybe a more generic name like "progress" would be appropriate? Yes, probably! Thanks, Ludo=E2=80=99.