You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make AbstractWorkerPool methods thread-safe and more consistent
Previously they did not handle dead workers in the same way. In particular
`take!` would remove dead workers but none of the other methods did, leading to
cases where `isready` might return true but `take!` would still block.
Now they should all be consistent with each other; except for `wait` which will
block if the pool is empty, unlike `take!` which will throw an exception. This
seems like a reasonable tradeoff to minimize breakage while still ensuring that
'take!() will block if wait() blocks' holds.
In theory one could put the dead worker checks in other methods like `length`
and `put!`, but the checks would still need to be in `take!`/`isready` etc so it
seems simpler to just acknowledge the lack of thread-safety in these methods
upfront.
0 commit comments