Mercurial > core / lisp/std/tests/task.lisp
changeset 691: |
295ea43ceb2d |
parent: |
8b10eabe89dd
|
child: |
f51b73f49946 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Wed, 02 Oct 2024 23:39:07 -0400 |
permissions: |
-rw-r--r-- |
description: |
tasks |
1 ;;; tests/task.lisp --- Task Tests 6 (in-package :std/tests) 10 "Test task-pools, oracles, and workers." 11 (with-threads (4 :args (&optional (a 0) (b 1) (c 2))) 13 ;; *ORACLE-THREADS* contains the *CURRENT-THREAD*. 14 (std/task:with-task-pool (tp :count 10 :spawn 4) 15 (is (= 4 (length (task-pool-workers tp)))) 16 (std/task::task-pool-lock tp) 17 (is (= 4 (std/task::mailbox-count (task-pool-results tp)))) 20 (is (eql t (std/task::receive-message (task-pool-results tp))))) 21 (is (null (std/task::receive-message-no-hang (task-pool-results tp))))))