Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow worker arguments of any type #95

Open
manifest opened this issue Nov 18, 2016 · 2 comments
Open

Allow worker arguments of any type #95

manifest opened this issue Nov 18, 2016 · 2 comments

Comments

@manifest
Copy link

There is no sense to restrict worker arguments to proplists. While they are opaque to poolboy and are passed as is, they could be anything.

@manifest
Copy link
Author

For instance, it's handy to use map type for worker's configuration. But by doing it you will receive dialyzer error:

make dialyze
  Checking whether the PLT /Users/aenesterov/projects/github/riak-connection-pool/.riakc_pool.plt is up-to-date... yes
  Proceeding with analysis...
riakc_pool_conn.erl:37: The specified type for the 1st argument of start_link/1 (map()) is not a supertype of [atom() | tuple()], which is expected type for this argument in the callback of the poolboy_worker behaviour
riakc_pool_conn.erl:38: The inferred type for the 1st argument of start_link/1 (#{'host':=maybe_improper_list(), 'port':=pos_integer(), _=>_}) is not a supertype of [atom() | tuple()], which is expected type for this argument in the callback of the poolboy_worker behaviour
Unknown types:
  ssl:sslsocket/0
 done in 0m1.25s
done (warnings were emitted)
make: *** [dialyze] Error 2

@manifest
Copy link
Author

@devinus what do you think on that matter?

rlipscombe added a commit to rlipscombe/poolboy that referenced this issue Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant