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
|
|
@ -939,6 +939,10 @@
|
|||
(eq? x resource))
|
||||
resources)))
|
||||
|
||||
(when (and (not (q-empty? waiters))
|
||||
(< (- (length resources) 1)
|
||||
max-size))
|
||||
(spawn-fiber-to-return-new-resource))
|
||||
|
||||
(loop (if index
|
||||
(remove-at-index! resources index)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue