Mercurial > core / lisp/std/tests/task.lisp
changeset 692: |
f51b73f49946 |
parent: |
295ea43ceb2d
|
child: |
a36280d2ef4e |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Thu, 03 Oct 2024 17:56:11 -0400 |
permissions: |
-rw-r--r-- |
description: |
std/task and tests |
1 ;;; tests/task.lisp --- Task Tests 6 (in-package :std/tests) 11 (with-task-pool (tp :workers 4 :tasks 10 :start t) 12 (is (= 4 (length (task-pool-workers tp)))) 13 (is (> (std/task::mailbox-count (task-pool-results tp)) 0)) 15 (is (null (std/task::receive-message (task-pool-results tp))))) 16 (is (null (std/task::receive-message-no-hang (task-pool-results tp)))) 18 (is (zerop (worker-count tp)))) 19 (with-task-pool (tp :workers 4 :tasks 4 :start nil) 20 (is (zerop (sb-concurrency:mailbox-count (results tp)))) 21 (start-task-workers tp) 22 (loop for w across (workers tp) 24 (is (= 4 (sb-concurrency:mailbox-count (results tp))))))