Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add poolboy:status/1 to get stats on a pool

  • Loading branch information...
commit 99be235bf264611af8dbc2257b012875f3fb4edf 1 parent 4987c10
James Golick jamesgolick authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/poolboy.erl
6 src/poolboy.erl
View
@@ -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]).
@@ -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(),
Please sign in to comment.
Something went wrong with that request. Please try again.