summaryrefslogtreecommitdiff
path: root/src/cuirass/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-26 14:43:48 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-26 14:43:48 +0100
commit39cf6e6ed013e80efbd2816c42c769c327df59a1 (patch)
treed30283512ee61602079b4ed677c03157199eb736 /src/cuirass/base.scm
parent8d44590099aad46b0f3c4f6537d44076b2cfb704 (diff)
downloadcuirass-39cf6e6ed013e80efbd2816c42c769c327df59a1.tar
cuirass-39cf6e6ed013e80efbd2816c42c769c327df59a1.tar.gz
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'.
Diffstat (limited to 'src/cuirass/base.scm')
-rw-r--r--src/cuirass/base.scm8
1 files 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 ()