Make resource pool changes and add parallelism limiter
All checks were successful
/ test (push) Successful in 9s
All checks were successful
/ test (push) Successful in 9s
This was motivated by trying to allow for completely cleaning up resource pools, which involved removing their use of fiberize which currently has no destroy mechanism. As part of this, there's a new parallelism limiter mechanism using resource pools rather than fibers, and also a fixed size resource pool. The tests now drain? and destroy the resource pools to check cleaning up.
This commit is contained in:
parent
edf62414ee
commit
ab5411da42
5 changed files with 669 additions and 153 deletions
|
@ -111,4 +111,16 @@
|
|||
|
||||
(assert-equal a 1))))
|
||||
|
||||
(run-fibers-for-tests
|
||||
(lambda ()
|
||||
(let ((parallelism-limiter (make-parallelism-limiter 2)))
|
||||
(fibers-for-each
|
||||
(lambda _
|
||||
(with-parallelism-limiter
|
||||
parallelism-limiter
|
||||
#f))
|
||||
(iota 50))
|
||||
|
||||
(destroy-parallelism-limiter parallelism-limiter))))
|
||||
|
||||
(display "parallelism test finished successfully\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue