From cce954a7d9f1a28d03c6d45c350cf64d422de7ed Mon Sep 17 00:00:00 2001 From: Roger Lipscombe Date: Fri, 29 Nov 2019 09:32:34 +0000 Subject: [PATCH] Allow worker arguments of any type - https://github.com/devinus/poolboy/issues/95 - https://github.com/devinus/poolboy/issues/136 --- src/poolboy.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/poolboy.erl b/src/poolboy.erl index db20541..ebcf5b6 100644 --- a/src/poolboy.erl +++ b/src/poolboy.erl @@ -93,14 +93,14 @@ child_spec(PoolId, PoolArgs) -> -spec child_spec(PoolId :: term(), PoolArgs :: proplists:proplist(), - WorkerArgs :: proplists:proplist()) + WorkerArgs :: any()) -> supervisor:child_spec(). child_spec(PoolId, PoolArgs, WorkerArgs) -> child_spec(PoolId, PoolArgs, WorkerArgs, tuple). -spec child_spec(PoolId :: term(), PoolArgs :: proplists:proplist(), - WorkerArgs :: proplists:proplist(), + WorkerArgs :: any(), ChildSpecFormat :: 'tuple' | 'map') -> supervisor:child_spec(). child_spec(PoolId, PoolArgs, WorkerArgs, tuple) -> @@ -120,7 +120,7 @@ start(PoolArgs) -> start(PoolArgs, PoolArgs). -spec start(PoolArgs :: proplists:proplist(), - WorkerArgs:: proplists:proplist()) + WorkerArgs:: any()) -> start_ret(). start(PoolArgs, WorkerArgs) -> start_pool(start, PoolArgs, WorkerArgs). @@ -132,7 +132,7 @@ start_link(PoolArgs) -> start_link(PoolArgs, PoolArgs). -spec start_link(PoolArgs :: proplists:proplist(), - WorkerArgs:: proplists:proplist()) + WorkerArgs :: any()) -> start_ret(). start_link(PoolArgs, WorkerArgs) -> start_pool(start_link, PoolArgs, WorkerArgs).