dashbitco / nimble_pool

A tiny resource-pool implementation for Elixir
347 stars 20 forks source link

Ensure lazy pool can't start more workers than config allows #15

Closed sneako closed 3 years ago

sneako commented 3 years ago

We use lazy pools in Finch and recently someone pointed out that they were seeing more connections opened than their configuration should have allowed. Original issue here: https://github.com/keathley/finch/issues/115

Previously a lazy NimblePool would always init a new worker if there were none available. This change adds check to make sure we have not hit the max pool size already.

wojtekmach commented 3 years ago

don't worry about build failure, looking into it.

josevalim commented 3 years ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

josevalim commented 3 years ago

New version is out!

sneako commented 3 years ago

New version is out!

I see the new version has been tagged, but could you please push it to hex as well when you have a chance?

josevalim commented 3 years ago

Done, forgot to input the password. :D