Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 99be235bf264611af8dbc2257b012875f3fb4edf 1 parent 4987c10
James Golick authored July 03, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  src/poolboy.erl
6  src/poolboy.erl
@@ -4,7 +4,7 @@
4 4
 -behaviour(gen_fsm).
5 5
 
6 6
 -export([checkout/1, checkout/2, checkout/3, checkin/2, transaction/2,
7  
-         child_spec/2, start_link/1, stop/1]).
  7
+         child_spec/2, start_link/1, stop/1, status/1]).
8 8
 -export([init/1, ready/2, ready/3, overflow/2, overflow/3, full/2, full/3,
9 9
          handle_event/3, handle_sync_event/4, handle_info/3, terminate/3,
10 10
          code_change/4]).
@@ -67,6 +67,10 @@ start_link(Args)  ->
67 67
 stop(Pool) ->
68 68
     gen_fsm:sync_send_all_state_event(Pool, stop).
69 69
 
  70
+-spec status(Pool :: node()) -> {state, integer(), integer(), integer()}.
  71
+status(Pool) ->
  72
+    gen_fsm:sync_send_all_state_event(Pool, status).
  73
+
70 74
 init(Args) ->
71 75
     process_flag(trap_exit, true),
72 76
     Waiting = queue:new(),

0 notes on commit 99be235

Please sign in to comment.
Something went wrong with that request. Please try again.