Class: Htmless::SynchronizedPool
Instance Attribute Summary
Attributes inherited from Pool
Instance Method Summary (collapse)
- - (Object) get
-
- (SynchronizedPool) initialize(klass)
constructor
A new instance of SynchronizedPool.
- - (Object) release(builder)
Methods inherited from Pool
Constructor Details
- (SynchronizedPool) initialize(klass)
A new instance of SynchronizedPool
58 59 60 61 |
# File 'lib/htmless/pool.rb', line 58 def initialize(klass) super(klass) @mutex = Mutex.new end |
Instance Method Details
- (Object) get
63 64 65 |
# File 'lib/htmless/pool.rb', line 63 def get @mutex.synchronize { super } end |
- (Object) release(builder)
67 68 69 |
# File 'lib/htmless/pool.rb', line 67 def release(builder) @mutex.synchronize { super(builder) } end |