Coverage report: /home/ellis/comp/core/std/tests/task.lisp

KindCoveredAll%
expression03 0.0
branch00nil
Key
Not instrumented
Conditionalized out
Executed
Not executed
 
Both branches taken
One branch taken
Neither branch taken
1
 ;;; tests/task.lisp --- Task Tests
2
 
3
 ;; 
4
 
5
 ;;; Code:
6
 (in-package :std/tests)
7
 (in-suite :std)
8
 
9
 (deftest task-pool (:skip t)
10
   "Task Pool tests."
11
   (with-task-pool (tp :workers 4 :tasks 10)
12
     (is (= 4 (length (workers tp))))
13
     (is (> (std/task::mailbox-count (results tp)) 0))
14
     (dotimes (i 4)
15
       (is (null (std/task::receive-message (results tp)))))
16
     (is (null (std/task::receive-message-no-hang (results tp))))
17
     (kill-workers tp)
18
     (is (zerop (worker-count tp))))
19
   (with-task-pool (tp :workers 4 :tasks 4)
20
     (is (zerop (sb-concurrency:mailbox-count (results tp))))
21
     (start-task-workers tp)
22
     (loop for w across (workers tp)
23
           do (join-worker w))
24
     (is (= 4 (sb-concurrency:mailbox-count (results tp))))))