[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/13: Fix par-map&
From: |
Christopher Baines |
Subject: |
07/13: Fix par-map& |
Date: |
Fri, 19 Jan 2024 04:57:47 -0500 (EST) |
cbaines pushed a commit to branch master
in repository data-service.
commit b8bd56a8f5441bb45f0f3731987fda27ccd9674f
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Thu Jan 18 14:40:48 2024 +0000
Fix par-map&
To actually work in parallel.
---
guix-data-service/utils.scm | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/guix-data-service/utils.scm b/guix-data-service/utils.scm
index 09f47f8..5d7d4ba 100644
--- a/guix-data-service/utils.scm
+++ b/guix-data-service/utils.scm
@@ -479,16 +479,18 @@ available. Return the resource once PROC has returned."
(define (par-mapper' mapper cons)
(lambda (proc . lists)
- (let loop ((lists lists))
- (match lists
- (((heads tails ...) ...)
- (let ((tail (loop tails))
- (head (defer-to-parallel-fiber
- (lambda ()
- (apply proc heads)))))
- (cons (fetch-result-of-defered-thunks head) tail)))
- (_
- '())))))
+ (apply
+ fetch-result-of-defered-thunks
+ (let loop ((lists lists))
+ (match lists
+ (((heads tails ...) ...)
+ (let ((tail (loop tails))
+ (head (defer-to-parallel-fiber
+ (lambda ()
+ (apply proc heads)))))
+ (cons head tail)))
+ (_
+ '()))))))
(define par-map& (par-mapper' map cons))
- branch master updated (241d7e4 -> e0a6c84), Christopher Baines, 2024/01/19
- 04/13: Have delete-duplicates/sort! take a equality procedure, Christopher Baines, 2024/01/19
- 07/13: Fix par-map&,
Christopher Baines <=
- 09/13: Split and instrument parts of inferior-packages->package-metadata-ids, Christopher Baines, 2024/01/19
- 08/13: Rewrite part of insert-missing-data-and-return-all-ids to avoid filter, Christopher Baines, 2024/01/19
- 11/13: Fixup tests, Christopher Baines, 2024/01/19
- 13/13: Try to fix issues with derivations being GC'ed, Christopher Baines, 2024/01/19
- 10/13: Add meaningful parallelism to processing jobs, Christopher Baines, 2024/01/19
- 03/13: Add back inferior heap size reporting, Christopher Baines, 2024/01/19
- 05/13: Make it possible to destroy a resource pool, Christopher Baines, 2024/01/19
- 02/13: Use delete-duplicates/sort! in inferior-packages->license-set-ids, Christopher Baines, 2024/01/19
- 01/13: Use delete-duplicates/sort! in insert-missing-data-and-return-all-ids, Christopher Baines, 2024/01/19
- 12/13: Remove drain? #t from process job, Christopher Baines, 2024/01/19