File tree 2 files changed +10
-3
lines changed 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change
1
+ * .st linguist-language =Smalltalk
Original file line number Diff line number Diff line change 1
1
# ObjectPool
2
+
3
+ [ ![ GitHub release] ( https://img.shields.io/github/release/pharo-ide/ObjectPool.svg )] ( https://github.com/pharo-ide/ObjectPool/releases/latest )
4
+ [ ![ Build Status] ( https://github.com/pharo-ide/ObjectPool/workflows/Build/badge.svg?branch=master )] ( https://github.com/pharo-ide/ObjectPool/actions?query=workflow%3ABuild )
5
+ [ ![ Coverage Status] ( https://codecov.io/github/pharo-ide/ObjectPool/coverage.svg?branch=master )] ( https://codecov.io/gh/pharo-ide/ObjectPool/branch/master )
6
+ [ ![ Pharo 7.0] ( https://img.shields.io/badge/Pharo-7.0-informational )] ( https://pharo.org )
7
+ [ ![ Pharo 8.0] ( https://img.shields.io/badge/Pharo-8.0-informational )] ( https://pharo.org )
8
+
2
9
Object Pool offers easy way to build pools for objects. One common situation
3
10
could be pooling database connections. This library was created for supporting pooling
4
11
of GlorpDBX database connections. However GlorpDBX related code is different
@@ -19,11 +26,11 @@ OPBasicPool new
19
26
To get new collection from the pool:
20
27
``` Smalltalk
21
28
pool withPooled: [:o| "Do something"].
22
- ```
29
+ ```
23
30
To also clear collections when they are returned add passivator
24
31
``` Smalltalk
25
32
pool passivator:[:o|o removeAll].
26
- ```
33
+ ```
27
34
Or to do that before borrow add activator:
28
35
``` Smalltalk
29
36
pool activator:[:o|o removeAll].
48
55
baseline: 'ObjectPool'
49
56
with: [ spec repository: 'github://pharo-ide/ObjectPool:v1.0.0' ]
50
57
```
51
-
You can’t perform that action at this time.
0 commit comments