We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdbe8a2 commit bb20042Copy full SHA for bb20042
lib/pond.rb
@@ -7,10 +7,6 @@ class Timeout < StandardError; end
7
8
attr_reader :allocated, :available, :collection
9
10
- def self.wrap(*args, &block)
11
- Wrapper.new(*args, &block)
12
- end
13
-
14
def initialize(options = {}, &block)
15
@monitor = Monitor.new
16
@cv = Monitor::ConditionVariable.new(@monitor)
@@ -108,6 +104,12 @@ def sync(&block)
108
104
@monitor.synchronize(&block)
109
105
end
110
106
107
+ class << self
+ def wrap(*args, &block)
+ Wrapper.new(*args, &block)
+ end
111
112
+
113
class Wrapper < BasicObject
114
attr_reader :pond
115
0 commit comments