Skip to content

Commit

Permalink
add poolboy:status/1 to get stats on a pool
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgolick committed Jul 4, 2012
1 parent 4987c10 commit 99be235
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/poolboy.erl
Expand Up @@ -4,7 +4,7 @@
-behaviour(gen_fsm).

-export([checkout/1, checkout/2, checkout/3, checkin/2, transaction/2,
child_spec/2, start_link/1, stop/1]).
child_spec/2, start_link/1, stop/1, status/1]).
-export([init/1, ready/2, ready/3, overflow/2, overflow/3, full/2, full/3,
handle_event/3, handle_sync_event/4, handle_info/3, terminate/3,
code_change/4]).
Expand Down Expand Up @@ -67,6 +67,10 @@ start_link(Args) ->
stop(Pool) ->
gen_fsm:sync_send_all_state_event(Pool, stop).

-spec status(Pool :: node()) -> {state, integer(), integer(), integer()}.
status(Pool) ->
gen_fsm:sync_send_all_state_event(Pool, status).

init(Args) ->
process_flag(trap_exit, true),
Waiting = queue:new(),
Expand Down

0 comments on commit 99be235

Please sign in to comment.