   return-to-pool
   "Return a borrowed pool instance to its free pool."
   [context :- PoolContext
-   instance :- PoolInstance]
+   instance :- JRubyPuppetInstance]
   (let [pool (get-pool context)]
     (.put pool instance)))
    (.runScriptlet "require 'puppet/server/master'")))

(schema/defn ^:always-validate
  create-pool-instance :- PoolInstance
  "Creates a new pool instance."
  [config   :- JRubyPuppetConfig
   profiler :- (schema/maybe PuppetProfiler)]

  (.size (get-pool context)))

(schema/defn ^:always-validate
  borrow-from-pool :- JRubyPuppetInstance
  "Borrows a JRubyPuppet interpreter from the pool. If there are no instances
  left in the pool then this function will block until there is one available."
  [context :- PoolContext]
