dashbitco / nimble_pool

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

Change wording in README.md #39

Closed preciz closed 1 year ago

preciz commented 1 year ago

In the README.md currently it says:

First we start the port:

      iex> child = {NimblePool, worker: {PortPool, :cat}, name: PortPool}
      iex> Supervisor.start_link([child], strategy: :one_for_one)

I believe this is confusing since what we are starting is a pool of ports synchronously not "the port".

In the following example in the README.md:

  First we start the connection:

      child = {NimblePool, worker: {HTTP1Pool, {:https, "elixir-lang.org", 443}}, name: HTTP1Pool}
      Supervisor.start_link([child], strategy: :one_for_one)

Here then below what it does it starts the pool which has :async worker initialization, so I think here also the "the connection" should be changed.

This is why I opened this PR, I hope I'm not missing any details. Thanks for reviewing.

josevalim commented 1 year ago

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