[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#37510] [PATCH 1/1] compile: Fix race condition on completion progre
From: |
Ludovic Courtès |
Subject: |
[bug#37510] [PATCH 1/1] compile: Fix race condition on completion progress. |
Date: |
Thu, 26 Sep 2019 22:57:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Eric Bavier <address@hidden> skribis:
>>> +++ b/guix/build/compile.scm
>>> @@ -173,7 +173,8 @@ files are for HOST, a GNU triplet such as
>>> \"x86_64-linux-gnu\"."
>>>
>>> (define (build file)
>>> (with-mutex progress-lock
>>> - (report-compilation file total completed))
>>> + (report-compilation file total completed)
>>> + (set! completed (+ 1 completed)))
>>
>> Here ‘completed’ is incremented before the thing is even started.
>
> Maybe a more generic name like "progress" would be appropriate?
Yes, probably!
Thanks,
Ludo’.