;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (test-workers) #:use-module (guix workers) #:use-module (ice-9 threads) #:use-module (srfi srfi-64)) (test-begin "workers") (test-equal "enqueue" 4242 (let* ((pool (make-pool)) (result 0) (1+! (let ((lock (make-mutex))) (lambda () (with-mutex lock (set! result (+ result 1))))))) (let loop ((i 4242)) (unless (zero? i) (pool-enqueue! pool 1+!) (loop (- i 1)))) (let poll () (unless (pool-idle? pool) (pk 'busy result) (sleep 1) (poll))) result)) ;; Same as above, but throw exceptions within the workers and make sure they ;; remain alive. (test-equal "exceptions" 4242 (let* ((pool (make-pool 10)) (result 0) (1+! (let ((lock (make-mutex))) (lambda () (with-mutex lock (set! result (+ result 1))))))) (let loop ((i 10)) (unless (zero? i) (pool-enqueue! pool (lambda () (throw 'whatever))) (loop (- i 1)))) (let loop ((i 4242)) (unless (zero? i) (pool-enqueue! pool 1+!) (loop (- i 1)))) (let poll () (unless (pool-idle? pool) (pk 'busy result) (sleep 1) (poll))) result)) (test-end) 0ef63b65b6'>root/gnu/packages/shellutils.scm
AgeCommit message (Expand)Author
2024-11-29gnu: liquidprompt: Patch additional utilities...* gnu/packages/shellutils.scm (liquidprompt) [inputs]: Add coreutils and inetutils. [arguments]<#:phases>: Replace the paths of more utilites Change-Id: I84578ca40300a7527a23e5d8c3257d49be911a7b Signed-off-by: Ludovic Courtès <ludo@gnu.org> Sisiutl
2024-08-31gnu: boxes: Import the correct set of modules....* gnu/packages/shellutils.scm (boxes) [arguments] <modules>: Replace %default-gnu-imported-modules with %default-gnu-modules. Change-Id: I5272366ead3929e0ce2311ca2a5e4c5138523927 Maxim Cournoyer
2024-08-31build-systems: gnu: Export %default-gnu-imported-modules and %default-gnu-mod......Until now users would have to cargo cult or inspect the private %default-modules variable of (guix build-systems gnu) to discover which modules to include when extending the used modules via the #:modules argument. The renaming was automated via the command: $ git grep -l %gnu-build-system-modules | xargs sed 's/%gnu-build-system-modules/%default-gnu-imported-modules/' -i * guix/build-system/gnu.scm (%gnu-build-system-modules): Rename to... (%default-gnu-imported-modules): ... this. (%default-modules): Rename to... (%default-gnu-modules): ... this. Export. (dist-package, gnu-build, gnu-cross-build): Adjust accordingly. Change-Id: Idef307fff13cb76f3182d782b26e1cd3a5c757ee Maxim Cournoyer
2024-08-23gnu: packages/shellutils: Remove golang module....Remove no longer required "golang" module from scope. Change-Id: I8982157b6143bffc74130377f385da0b144d626d Sharlatan Hellseher
2024-08-23gnu: direnv: Adjust inputs....* gnu/packages/shellutils.scm (direnv): Adjust inputs. [native-inputs]: Remove go-github-com-direnv-go-dotenv. Change-Id: Ib9edf656eb30d518dd2f4551d0d9c7eb282c917b Sharlatan Hellseher
2024-08-23gnu: shfmt: Activate tests....* gnu/packages/shellutils.scm (shfmt): Activate tests. [native-inputs]: Remove go-github-com-frankban-quicktest and go-github-com-pkg-diff; add go-github-com-go-quicktest-qt and go-github-com-muesli-cancelreader. Change-Id: Ib11765afb102d1bbb947e41988c9ac6403c694df Sharlatan Hellseher
2024-08-23gnu: Add shfmt....* gnu/packages/golang.scm (shfmt): New variable. Change-Id: I7c8bcb0f0a1d0c45d5f8f2274724188a435f0cd7 Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Brian Kubisiak
2024-08-20gnu: direnv: Update to 2.34.0....* gnu/packages/shellutils.scm (direnv): Update to 2.34.0. Change-Id: I725b63e5fa0a37497900ace28dc4d1bd85e45057 jgart