Subject: Re: [bug#32121] [PATCH 1/5] base: Compile CHECKOUT in the fiber.

From: [email-masked] (Ludovic Courtès)
Date: Fri, 13 Jul 2018 10:32:41 +0200

Morning!

Clément Lassieur <[email-masked]> skribis:

> Because it may take time and thus prevent PROCESS-SPECS to run every INTERVAL
> seconds.
>
> * src/cuirass/base.scm (process-specs): move the COMPILE invocation inside
> SPAWN-FIBER's thunk.  Add log message.

[...]

> -               (when compile?
> -                 (non-blocking (compile checkout)))
> -
>                 (spawn-fiber
>                  (lambda ()
> +                  (when compile?
> +                    (log-message "compiling '~a' with commit ~s" name commit)
> +                    (non-blocking (compile checkout)))

I think this doesn’t bring anything compared to the existing
‘non-blocking’ call.

The ‘non-blocking’ procedure evaluates its argument in a separate
thread; the calling fiber then “waits” for a message from that thread,
which it gets when the computation is over.  The ‘get-message’ is
non-blocking though: the calling fiber is simply unscheduled until the
message has arrived.

Does that make sense?

Ludo’.