guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ludovic Courtès
Date: Fri, 26 Jan 2018 09:24:05 -0500 (EST)

branch: master
commit 39cf6e6ed013e80efbd2816c42c769c327df59a1
Author: Ludovic Courtès <address@hidden>
Date:   Fri Jan 26 14:43:48 2018 +0100

    base: Make repository fetching and compilation non-blocking.
    
    Previously these calls would effectively suspend execution of all the
    fibers until they had completed.
    
    * src/cuirass/base.scm (process-specs): Wrap 'fetch-repository' and
    'compile' calls in 'non-blocking'.
---
 src/cuirass/base.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index c08df23..50f65c1 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -23,6 +23,7 @@
   #:use-module (fibers)
   #:use-module (cuirass logging)
   #:use-module (cuirass database)
+  #:use-module (cuirass utils)
   #:use-module (gnu packages)
   #:use-module (guix build utils)
   #:use-module (guix derivations)
@@ -480,7 +481,7 @@ updating DB accordingly."
          (log-message "considering spec '~a', URL '~a'"
                       name (assoc-ref spec #:url))
          (receive (checkout commit)
-             (fetch-repository store spec)
+             (non-blocking (fetch-repository store spec))
            (log-message "spec '~a': fetched commit ~s (stamp was ~s)"
                         name commit stamp)
            (when commit
@@ -492,8 +493,9 @@ updating DB accordingly."
                (copy-repository-cache checkout spec)
 
                (unless (assq-ref spec #:no-compile?)
-                 (compile (string-append (%package-cachedir) "/"
-                                         (assq-ref spec #:name))))
+                 (non-blocking
+                  (compile (string-append (%package-cachedir) "/"
+                                          (assq-ref spec #:name)))))
 
                (spawn-fiber
                 (lambda ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]