Fix a bug where resources pools could empty with waiters
This commit is contained in:
parent
40b64e269b
commit
a13098494d
2 changed files with 21 additions and 0 deletions
|
|
@ -211,4 +211,21 @@
|
|||
|
||||
(destroy-resource-pool resource-pool))))
|
||||
|
||||
(run-fibers-for-tests
|
||||
(lambda ()
|
||||
(let ((resource-pool (make-resource-pool
|
||||
(const 'foo)
|
||||
1
|
||||
#:lifetime 1
|
||||
#:destructor
|
||||
(const #t))))
|
||||
(for-each
|
||||
(lambda _
|
||||
(with-resource-from-pool resource-pool
|
||||
res
|
||||
res))
|
||||
(iota 20))
|
||||
|
||||
(destroy-resource-pool resource-pool))))
|
||||
|
||||
(display "resource-pool test finished successfully\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue