Permalink
Browse files

Forgot to add new boss_pool.erl

  • Loading branch information...
Evan Miller
Evan Miller committed Feb 11, 2012
1 parent fd2df1d commit f8836ace09136920e6d395239970acd4101751cf
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/boss_pool.erl
View
@@ -0,0 +1,14 @@
+-module(boss_pool).
+-export([call/2, call/3]).
+
+call(Pool, Msg) ->
+ Worker = poolboy:checkout(Pool),
+ Reply = gen_server:call(Worker, Msg),
+ poolboy:checkin(Pool, Worker),
+ Reply.
+
+call(Pool, Msg, Timeout) ->
+ Worker = poolboy:checkout(Pool),
+ Reply = gen_server:call(Worker, Msg, Timeout),
+ poolboy:checkin(Pool, Worker),
+ Reply.

0 comments on commit f8836ac

Please sign in to comment.