Follow-up Comment #3, bug #67822 (group make):

It is not possible to return the token that started the job.

Consider the following.
Make is running with -j2 and needs to build targets x, y and z.
Make spawns the first child and this child is using the free token to build
x.
Make spawn another child and this second child obtains a token from the
jobserver to build y.
Make is now waiting for one of these two jobs to finish before make can start
another job to build z.
The first child finishes first. At this point there is only one outstanding
job (y) and make can begin z.
Well, there is no token to release, because the first child was using the free
token. However, some token has to be released to unblock the  reader who is
blocked on the pipe waiting for a token.
Before this patch make would release a hardcoded token '+'. With this patch
makes releases one token of the earlier acquired tokens. But this token cannot
be the token that started the job, because the job was running on a free
token.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67822>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to