Skip to content

Commit cd23d57

Browse files
author
Oren (electricessence)
committed
Upated versions.
1 parent 1a8b81d commit cd23d57

7 files changed

Lines changed: 118 additions & 158 deletions

benchmarking/BenchmarkResult.csv

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
Batch,Pool Type," To (In Parallel)",d 90%-Take/10%-Give (In Parallel),d 50%-Take/50%-Give (In Parallel),d 10%-Take/90%-Give (In Parallel),y Pool (.TryTake()),L,
2-
Repeat 1200000 for size 4,ConcurrentQueueObjectPool,00:00:04.3234623,00:00:04.2859159,00:00:04.0856252,00:00:04.1629271,00:00:00.2383071,00:00:17.0962376,
3-
Repeat 1200000 for size 4,ConcurrentStackObjectPool,00:00:03.4181177,00:00:03.1483734,00:00:03.0326640,00:00:03.2275135,00:00:00.2194885,00:00:13.0461571,
4-
Repeat 1200000 for size 4,OptimisticArrayObjectPool,00:00:02.9567086,00:00:02.9408997,00:00:02.8979050,00:00:02.9429304,00:00:00.1781477,00:00:11.9165914,
5-
Repeat 1200000 for size 4,InterlockedArrayObjectPool,00:00:02.8507860,00:00:02.8378750,00:00:02.8065261,00:00:02.7729287,00:00:00.1748178,00:00:11.4429336,
6-
Repeat 480000 for size 10,ConcurrentQueueObjectPool,00:00:01.9110391,00:00:01.7929113,00:00:01.7431428,00:00:01.7539962,00:00:00.1864032,00:00:07.3874926,
7-
Repeat 480000 for size 10,ConcurrentStackObjectPool,00:00:02.2080509,00:00:01.9085663,00:00:01.7999023,00:00:02.0333784,00:00:00.2014246,00:00:08.1513225,
8-
Repeat 480000 for size 10,OptimisticArrayObjectPool,00:00:01.9464026,00:00:01.8209826,00:00:01.7283101,00:00:01.7703791,00:00:00.2067250,00:00:07.4727994,
9-
Repeat 480000 for size 10,InterlockedArrayObjectPool,00:00:01.9864203,00:00:01.8975615,00:00:01.7755688,00:00:01.8424227,00:00:00.2128414,00:00:07.7148147,
10-
Repeat 144000 for size 50,ConcurrentQueueObjectPool,00:00:01.0865387,00:00:00.9103388,00:00:00.7864308,00:00:00.8607428,00:00:00.2207286,00:00:03.8647797,
11-
Repeat 144000 for size 50,ConcurrentStackObjectPool,00:00:01.2035505,00:00:00.9058416,00:00:00.8623919,00:00:01.0519578,00:00:00.2300882,00:00:04.2538300,
12-
Repeat 144000 for size 50,OptimisticArrayObjectPool,00:00:01.0794476,00:00:00.9707866,00:00:00.7703522,00:00:00.8925395,00:00:00.5686048,00:00:04.2817307,
13-
Repeat 144000 for size 50,InterlockedArrayObjectPool,00:00:01.2918612,00:00:00.9923932,00:00:00.7856951,00:00:01.0361033,00:00:00.8871188,00:00:04.9931716,
14-
Repeat 96000 for size 100,ConcurrentQueueObjectPool,00:00:01.1936583,00:00:00.9884302,00:00:00.7937749,00:00:00.9104213,00:00:00.3325926,00:00:04.2188773,
15-
Repeat 96000 for size 100,ConcurrentStackObjectPool,00:00:01.2954728,00:00:01.5919051,00:00:00.8887785,00:00:01.1267305,00:00:00.3910861,00:00:05.2939730,
16-
Repeat 96000 for size 100,OptimisticArrayObjectPool,00:00:01.0586862,00:00:01.0613279,00:00:00.7160126,00:00:00.8147263,00:00:00.9588449,00:00:04.6095979,
17-
Repeat 96000 for size 100,InterlockedArrayObjectPool,00:00:01.5202602,00:00:01.0914433,00:00:00.7177933,00:00:01.1267538,00:00:02.1815610,00:00:06.6378116,
2+
Repeat 1200000 for size 4,ConcurrentQueueObjectPool,00:00:02.8137291,00:00:02.7153391,00:00:02.6985097,00:00:02.7410619,00:00:00.1839002,00:00:11.1525400,
3+
Repeat 1200000 for size 4,OptimisticArrayObjectPool,00:00:02.6651904,00:00:02.6475629,00:00:02.6552883,00:00:02.5890153,00:00:00.1745340,00:00:10.7315909,
4+
Repeat 1200000 for size 4,InterlockedArrayObjectPool,00:00:02.5827382,00:00:02.7023234,00:00:02.5996861,00:00:02.6370871,00:00:00.1624972,00:00:10.6843320,
5+
Repeat 480000 for size 10,ConcurrentQueueObjectPool,00:00:01.7226667,00:00:01.6591525,00:00:01.6255627,00:00:01.6121179,00:00:00.1629193,00:00:06.7824191,
6+
Repeat 480000 for size 10,OptimisticArrayObjectPool,00:00:01.7076846,00:00:01.7039172,00:00:01.6884271,00:00:01.6330203,00:00:00.2135140,00:00:06.9465632,
7+
Repeat 480000 for size 10,InterlockedArrayObjectPool,00:00:01.8557304,00:00:01.7516982,00:00:01.6388447,00:00:01.6915551,00:00:00.2162540,00:00:07.1540824,
8+
Repeat 144000 for size 50,ConcurrentQueueObjectPool,00:00:00.9993787,00:00:00.8644147,00:00:00.7644592,00:00:00.8417858,00:00:00.2118096,00:00:03.6818480,
9+
Repeat 144000 for size 50,OptimisticArrayObjectPool,00:00:01.0304016,00:00:00.9726821,00:00:00.7458965,00:00:00.8811575,00:00:00.6318591,00:00:04.2619968,
10+
Repeat 144000 for size 50,InterlockedArrayObjectPool,00:00:01.2025048,00:00:00.9502443,00:00:00.7301001,00:00:00.9604869,00:00:00.9480492,00:00:04.7913853,
11+
Repeat 96000 for size 100,ConcurrentQueueObjectPool,00:00:01.0717994,00:00:00.9417134,00:00:00.7430992,00:00:00.8641968,00:00:00.2921380,00:00:03.9129468,
12+
Repeat 96000 for size 100,OptimisticArrayObjectPool,00:00:00.9926382,00:00:01.0228171,00:00:00.6834145,00:00:00.7896683,00:00:01.0471828,00:00:04.5357209,
13+
Repeat 96000 for size 100,InterlockedArrayObjectPool,00:00:01.4431922,00:00:01.0450868,00:00:00.6856350,00:00:01.0800545,00:00:02.3318448,00:00:06.5858133,
14+
Repeat 76800 for size 250,ConcurrentQueueObjectPool,00:00:01.9927953,00:00:01.6576482,00:00:01.2314163,00:00:01.5604890,00:00:00.6205257,00:00:07.0628745,
15+
Repeat 76800 for size 250,OptimisticArrayObjectPool,00:00:03.0736505,00:00:02.3286546,00:00:01.0713747,00:00:01.3538321,00:00:04.0564585,00:00:11.8839704,
16+
Repeat 76800 for size 250,InterlockedArrayObjectPool,00:00:04.9460361,00:00:02.3117061,00:00:01.0202632,00:00:02.6333260,00:00:07.5373478,00:00:18.4486792,
17+
peat 96000 for size 100,InterlockedArrayObjectPool,00:00:01.5202602,00:00:01.0914433,00:00:00.7177933,00:00:01.1267538,00:00:02.1815610,00:00:06.6378116,
1818
Repeat 76800 for size 250,ConcurrentQueueObjectPool,00:00:02.1343720,00:00:01.7012785,00:00:01.2752111,00:00:01.6435934,00:00:00.6997324,00:00:07.4541874,
1919
Repeat 76800 for size 250,ConcurrentStackObjectPool,00:00:06.2066697,00:00:27.8900516,00:00:06.5621678,00:00:06.4422102,00:00:02.4804319,00:00:49.5815312,
2020
Repeat 76800 for size 250,OptimisticArrayObjectPool,00:00:02.0446809,00:00:02.2047801,00:00:01.0930008,00:00:01.3709434,00:00:03.2508715,00:00:09.9642767,

benchmarking/BenchmarkResult.txt

Lines changed: 90 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -2,179 +2,139 @@ Repeat 1200000 for size 4
22
------------------------------------
33

44
ConcurrentQueueObjectPool...............................
5-
00:00:04.3234623 Give To (In Parallel)
6-
00:00:04.2859159 Mixed 90%-Take/10%-Give (In Parallel)
7-
00:00:04.0856252 Mixed 50%-Take/50%-Give (In Parallel)
8-
00:00:04.1629271 Mixed 10%-Take/90%-Give (In Parallel)
9-
00:00:00.2383071 Empty Pool (.TryTake())
10-
00:00:17.0962376 TOTAL
11-
12-
ConcurrentStackObjectPool...............................
13-
00:00:03.4181177 Give To (In Parallel)
14-
00:00:03.1483734 Mixed 90%-Take/10%-Give (In Parallel)
15-
00:00:03.0326640 Mixed 50%-Take/50%-Give (In Parallel)
16-
00:00:03.2275135 Mixed 10%-Take/90%-Give (In Parallel)
17-
00:00:00.2194885 Empty Pool (.TryTake())
18-
00:00:13.0461571 TOTAL
5+
00:00:02.8137291 Give To (In Parallel)
6+
00:00:02.7153391 Mixed 90%-Take/10%-Give (In Parallel)
7+
00:00:02.6985097 Mixed 50%-Take/50%-Give (In Parallel)
8+
00:00:02.7410619 Mixed 10%-Take/90%-Give (In Parallel)
9+
00:00:00.1839002 Empty Pool (.TryTake())
10+
00:00:11.1525400 TOTAL
1911

2012
OptimisticArrayObjectPool...............................
21-
00:00:02.9567086 Give To (In Parallel)
22-
00:00:02.9408997 Mixed 90%-Take/10%-Give (In Parallel)
23-
00:00:02.8979050 Mixed 50%-Take/50%-Give (In Parallel)
24-
00:00:02.9429304 Mixed 10%-Take/90%-Give (In Parallel)
25-
00:00:00.1781477 Empty Pool (.TryTake())
26-
00:00:11.9165914 TOTAL
13+
00:00:02.6651904 Give To (In Parallel)
14+
00:00:02.6475629 Mixed 90%-Take/10%-Give (In Parallel)
15+
00:00:02.6552883 Mixed 50%-Take/50%-Give (In Parallel)
16+
00:00:02.5890153 Mixed 10%-Take/90%-Give (In Parallel)
17+
00:00:00.1745340 Empty Pool (.TryTake())
18+
00:00:10.7315909 TOTAL
2719

2820
InterlockedArrayObjectPool..............................
29-
00:00:02.8507860 Give To (In Parallel)
30-
00:00:02.8378750 Mixed 90%-Take/10%-Give (In Parallel)
31-
00:00:02.8065261 Mixed 50%-Take/50%-Give (In Parallel)
32-
00:00:02.7729287 Mixed 10%-Take/90%-Give (In Parallel)
33-
00:00:00.1748178 Empty Pool (.TryTake())
34-
00:00:11.4429336 TOTAL
21+
00:00:02.5827382 Give To (In Parallel)
22+
00:00:02.7023234 Mixed 90%-Take/10%-Give (In Parallel)
23+
00:00:02.5996861 Mixed 50%-Take/50%-Give (In Parallel)
24+
00:00:02.6370871 Mixed 10%-Take/90%-Give (In Parallel)
25+
00:00:00.1624972 Empty Pool (.TryTake())
26+
00:00:10.6843320 TOTAL
3527

3628

3729
Repeat 480000 for size 10
3830
------------------------------------
3931

4032
ConcurrentQueueObjectPool...............................
41-
00:00:01.9110391 Give To (In Parallel)
42-
00:00:01.7929113 Mixed 90%-Take/10%-Give (In Parallel)
43-
00:00:01.7431428 Mixed 50%-Take/50%-Give (In Parallel)
44-
00:00:01.7539962 Mixed 10%-Take/90%-Give (In Parallel)
45-
00:00:00.1864032 Empty Pool (.TryTake())
46-
00:00:07.3874926 TOTAL
47-
48-
ConcurrentStackObjectPool...............................
49-
00:00:02.2080509 Give To (In Parallel)
50-
00:00:01.9085663 Mixed 90%-Take/10%-Give (In Parallel)
51-
00:00:01.7999023 Mixed 50%-Take/50%-Give (In Parallel)
52-
00:00:02.0333784 Mixed 10%-Take/90%-Give (In Parallel)
53-
00:00:00.2014246 Empty Pool (.TryTake())
54-
00:00:08.1513225 TOTAL
33+
00:00:01.7226667 Give To (In Parallel)
34+
00:00:01.6591525 Mixed 90%-Take/10%-Give (In Parallel)
35+
00:00:01.6255627 Mixed 50%-Take/50%-Give (In Parallel)
36+
00:00:01.6121179 Mixed 10%-Take/90%-Give (In Parallel)
37+
00:00:00.1629193 Empty Pool (.TryTake())
38+
00:00:06.7824191 TOTAL
5539

5640
OptimisticArrayObjectPool...............................
57-
00:00:01.9464026 Give To (In Parallel)
58-
00:00:01.8209826 Mixed 90%-Take/10%-Give (In Parallel)
59-
00:00:01.7283101 Mixed 50%-Take/50%-Give (In Parallel)
60-
00:00:01.7703791 Mixed 10%-Take/90%-Give (In Parallel)
61-
00:00:00.2067250 Empty Pool (.TryTake())
62-
00:00:07.4727994 TOTAL
41+
00:00:01.7076846 Give To (In Parallel)
42+
00:00:01.7039172 Mixed 90%-Take/10%-Give (In Parallel)
43+
00:00:01.6884271 Mixed 50%-Take/50%-Give (In Parallel)
44+
00:00:01.6330203 Mixed 10%-Take/90%-Give (In Parallel)
45+
00:00:00.2135140 Empty Pool (.TryTake())
46+
00:00:06.9465632 TOTAL
6347

6448
InterlockedArrayObjectPool..............................
65-
00:00:01.9864203 Give To (In Parallel)
66-
00:00:01.8975615 Mixed 90%-Take/10%-Give (In Parallel)
67-
00:00:01.7755688 Mixed 50%-Take/50%-Give (In Parallel)
68-
00:00:01.8424227 Mixed 10%-Take/90%-Give (In Parallel)
69-
00:00:00.2128414 Empty Pool (.TryTake())
70-
00:00:07.7148147 TOTAL
49+
00:00:01.8557304 Give To (In Parallel)
50+
00:00:01.7516982 Mixed 90%-Take/10%-Give (In Parallel)
51+
00:00:01.6388447 Mixed 50%-Take/50%-Give (In Parallel)
52+
00:00:01.6915551 Mixed 10%-Take/90%-Give (In Parallel)
53+
00:00:00.2162540 Empty Pool (.TryTake())
54+
00:00:07.1540824 TOTAL
7155

7256

7357
Repeat 144000 for size 50
7458
------------------------------------
7559

7660
ConcurrentQueueObjectPool...............................
77-
00:00:01.0865387 Give To (In Parallel)
78-
00:00:00.9103388 Mixed 90%-Take/10%-Give (In Parallel)
79-
00:00:00.7864308 Mixed 50%-Take/50%-Give (In Parallel)
80-
00:00:00.8607428 Mixed 10%-Take/90%-Give (In Parallel)
81-
00:00:00.2207286 Empty Pool (.TryTake())
82-
00:00:03.8647797 TOTAL
83-
84-
ConcurrentStackObjectPool...............................
85-
00:00:01.2035505 Give To (In Parallel)
86-
00:00:00.9058416 Mixed 90%-Take/10%-Give (In Parallel)
87-
00:00:00.8623919 Mixed 50%-Take/50%-Give (In Parallel)
88-
00:00:01.0519578 Mixed 10%-Take/90%-Give (In Parallel)
89-
00:00:00.2300882 Empty Pool (.TryTake())
90-
00:00:04.2538300 TOTAL
61+
00:00:00.9993787 Give To (In Parallel)
62+
00:00:00.8644147 Mixed 90%-Take/10%-Give (In Parallel)
63+
00:00:00.7644592 Mixed 50%-Take/50%-Give (In Parallel)
64+
00:00:00.8417858 Mixed 10%-Take/90%-Give (In Parallel)
65+
00:00:00.2118096 Empty Pool (.TryTake())
66+
00:00:03.6818480 TOTAL
9167

9268
OptimisticArrayObjectPool...............................
93-
00:00:01.0794476 Give To (In Parallel)
94-
00:00:00.9707866 Mixed 90%-Take/10%-Give (In Parallel)
95-
00:00:00.7703522 Mixed 50%-Take/50%-Give (In Parallel)
96-
00:00:00.8925395 Mixed 10%-Take/90%-Give (In Parallel)
97-
00:00:00.5686048 Empty Pool (.TryTake())
98-
00:00:04.2817307 TOTAL
69+
00:00:01.0304016 Give To (In Parallel)
70+
00:00:00.9726821 Mixed 90%-Take/10%-Give (In Parallel)
71+
00:00:00.7458965 Mixed 50%-Take/50%-Give (In Parallel)
72+
00:00:00.8811575 Mixed 10%-Take/90%-Give (In Parallel)
73+
00:00:00.6318591 Empty Pool (.TryTake())
74+
00:00:04.2619968 TOTAL
9975

10076
InterlockedArrayObjectPool..............................
101-
00:00:01.2918612 Give To (In Parallel)
102-
00:00:00.9923932 Mixed 90%-Take/10%-Give (In Parallel)
103-
00:00:00.7856951 Mixed 50%-Take/50%-Give (In Parallel)
104-
00:00:01.0361033 Mixed 10%-Take/90%-Give (In Parallel)
105-
00:00:00.8871188 Empty Pool (.TryTake())
106-
00:00:04.9931716 TOTAL
77+
00:00:01.2025048 Give To (In Parallel)
78+
00:00:00.9502443 Mixed 90%-Take/10%-Give (In Parallel)
79+
00:00:00.7301001 Mixed 50%-Take/50%-Give (In Parallel)
80+
00:00:00.9604869 Mixed 10%-Take/90%-Give (In Parallel)
81+
00:00:00.9480492 Empty Pool (.TryTake())
82+
00:00:04.7913853 TOTAL
10783

10884

10985
Repeat 96000 for size 100
11086
------------------------------------
11187

11288
ConcurrentQueueObjectPool...............................
113-
00:00:01.1936583 Give To (In Parallel)
114-
00:00:00.9884302 Mixed 90%-Take/10%-Give (In Parallel)
115-
00:00:00.7937749 Mixed 50%-Take/50%-Give (In Parallel)
116-
00:00:00.9104213 Mixed 10%-Take/90%-Give (In Parallel)
117-
00:00:00.3325926 Empty Pool (.TryTake())
118-
00:00:04.2188773 TOTAL
119-
120-
ConcurrentStackObjectPool...............................
121-
00:00:01.2954728 Give To (In Parallel)
122-
00:00:01.5919051 Mixed 90%-Take/10%-Give (In Parallel)
123-
00:00:00.8887785 Mixed 50%-Take/50%-Give (In Parallel)
124-
00:00:01.1267305 Mixed 10%-Take/90%-Give (In Parallel)
125-
00:00:00.3910861 Empty Pool (.TryTake())
126-
00:00:05.2939730 TOTAL
89+
00:00:01.0717994 Give To (In Parallel)
90+
00:00:00.9417134 Mixed 90%-Take/10%-Give (In Parallel)
91+
00:00:00.7430992 Mixed 50%-Take/50%-Give (In Parallel)
92+
00:00:00.8641968 Mixed 10%-Take/90%-Give (In Parallel)
93+
00:00:00.2921380 Empty Pool (.TryTake())
94+
00:00:03.9129468 TOTAL
12795

12896
OptimisticArrayObjectPool...............................
129-
00:00:01.0586862 Give To (In Parallel)
130-
00:00:01.0613279 Mixed 90%-Take/10%-Give (In Parallel)
131-
00:00:00.7160126 Mixed 50%-Take/50%-Give (In Parallel)
132-
00:00:00.8147263 Mixed 10%-Take/90%-Give (In Parallel)
133-
00:00:00.9588449 Empty Pool (.TryTake())
134-
00:00:04.6095979 TOTAL
97+
00:00:00.9926382 Give To (In Parallel)
98+
00:00:01.0228171 Mixed 90%-Take/10%-Give (In Parallel)
99+
00:00:00.6834145 Mixed 50%-Take/50%-Give (In Parallel)
100+
00:00:00.7896683 Mixed 10%-Take/90%-Give (In Parallel)
101+
00:00:01.0471828 Empty Pool (.TryTake())
102+
00:00:04.5357209 TOTAL
135103

136104
InterlockedArrayObjectPool..............................
137-
00:00:01.5202602 Give To (In Parallel)
138-
00:00:01.0914433 Mixed 90%-Take/10%-Give (In Parallel)
139-
00:00:00.7177933 Mixed 50%-Take/50%-Give (In Parallel)
140-
00:00:01.1267538 Mixed 10%-Take/90%-Give (In Parallel)
141-
00:00:02.1815610 Empty Pool (.TryTake())
142-
00:00:06.6378116 TOTAL
105+
00:00:01.4431922 Give To (In Parallel)
106+
00:00:01.0450868 Mixed 90%-Take/10%-Give (In Parallel)
107+
00:00:00.6856350 Mixed 50%-Take/50%-Give (In Parallel)
108+
00:00:01.0800545 Mixed 10%-Take/90%-Give (In Parallel)
109+
00:00:02.3318448 Empty Pool (.TryTake())
110+
00:00:06.5858133 TOTAL
143111

144112

145113
Repeat 76800 for size 250
146114
------------------------------------
147115

148116
ConcurrentQueueObjectPool...............................
149-
00:00:02.1343720 Give To (In Parallel)
150-
00:00:01.7012785 Mixed 90%-Take/10%-Give (In Parallel)
151-
00:00:01.2752111 Mixed 50%-Take/50%-Give (In Parallel)
152-
00:00:01.6435934 Mixed 10%-Take/90%-Give (In Parallel)
153-
00:00:00.6997324 Empty Pool (.TryTake())
154-
00:00:07.4541874 TOTAL
155-
156-
ConcurrentStackObjectPool...............................
157-
00:00:06.2066697 Give To (In Parallel)
158-
00:00:27.8900516 Mixed 90%-Take/10%-Give (In Parallel)
159-
00:00:06.5621678 Mixed 50%-Take/50%-Give (In Parallel)
160-
00:00:06.4422102 Mixed 10%-Take/90%-Give (In Parallel)
161-
00:00:02.4804319 Empty Pool (.TryTake())
162-
00:00:49.5815312 TOTAL
117+
00:00:01.9927953 Give To (In Parallel)
118+
00:00:01.6576482 Mixed 90%-Take/10%-Give (In Parallel)
119+
00:00:01.2314163 Mixed 50%-Take/50%-Give (In Parallel)
120+
00:00:01.5604890 Mixed 10%-Take/90%-Give (In Parallel)
121+
00:00:00.6205257 Empty Pool (.TryTake())
122+
00:00:07.0628745 TOTAL
163123

164124
OptimisticArrayObjectPool...............................
165-
00:00:02.0446809 Give To (In Parallel)
166-
00:00:02.2047801 Mixed 90%-Take/10%-Give (In Parallel)
167-
00:00:01.0930008 Mixed 50%-Take/50%-Give (In Parallel)
168-
00:00:01.3709434 Mixed 10%-Take/90%-Give (In Parallel)
169-
00:00:03.2508715 Empty Pool (.TryTake())
170-
00:00:09.9642767 TOTAL
125+
00:00:03.0736505 Give To (In Parallel)
126+
00:00:02.3286546 Mixed 90%-Take/10%-Give (In Parallel)
127+
00:00:01.0713747 Mixed 50%-Take/50%-Give (In Parallel)
128+
00:00:01.3538321 Mixed 10%-Take/90%-Give (In Parallel)
129+
00:00:04.0564585 Empty Pool (.TryTake())
130+
00:00:11.8839704 TOTAL
171131

172132
InterlockedArrayObjectPool..............................
173-
00:00:05.1034766 Give To (In Parallel)
174-
00:00:02.3508106 Mixed 90%-Take/10%-Give (In Parallel)
175-
00:00:01.0738597 Mixed 50%-Take/50%-Give (In Parallel)
176-
00:00:02.7216389 Mixed 10%-Take/90%-Give (In Parallel)
177-
00:00:08.5749945 Empty Pool (.TryTake())
178-
00:00:19.8247803 TOTAL
133+
00:00:04.9460361 Give To (In Parallel)
134+
00:00:02.3117061 Mixed 90%-Take/10%-Give (In Parallel)
135+
00:00:01.0202632 Mixed 50%-Take/50%-Give (In Parallel)
136+
00:00:02.6333260 Mixed 10%-Take/90%-Give (In Parallel)
137+
00:00:07.5373478 Empty Pool (.TryTake())
138+
00:00:18.4486792 TOTAL
179139

180140

benchmarking/Open.Disposable.ObjectPools.Benchmarking.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
<TargetFramework>netcoreapp3.0</TargetFramework>
66
<RootNamespace>Open.Disposable</RootNamespace>
77
<Version>1.0.0</Version>
88
</PropertyGroup>

source/ObjectPoolAutoTrimmer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public ObjectPoolAutoTrimmer(
4141

4242
if (pool is DisposableBase d)
4343
{
44-
if (d.IsDisposed) throw new ArgumentException("Cannot trim for an object pool that is already disposed.");
44+
if (d.WasDisposed) throw new ArgumentException("Cannot trim for an object pool that is already disposed.");
4545
d.BeforeDispose += Pool_BeforeDispose;
4646
}
4747

source/Open.Disposable.ObjectPools.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
55
<RootNamespace>Open.Disposable</RootNamespace>
66
<Description>A set of variations on ObjectPool implementations with differing underlying collections.
77

@@ -16,9 +16,9 @@ Part of the "Open" set of libraries.</Description>
1616
<RepositoryType>git</RepositoryType>
1717
<PackageTags>objectpool, dotnet, dotnetcore, cs, idisposable, threadsafe, thread-safe</PackageTags>
1818
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
19-
<Version>2.1.3</Version>
20-
<AssemblyVersion>2.1.3.0</AssemblyVersion>
21-
<FileVersion>2.1.3.0</FileVersion>
19+
<Version>2.2.0</Version>
20+
<AssemblyVersion>2.2.0.0</AssemblyVersion>
21+
<FileVersion>2.2.0.0</FileVersion>
2222
<PackageReleaseNotes></PackageReleaseNotes>
2323
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2424
</PropertyGroup>
@@ -42,7 +42,7 @@ Part of the "Open" set of libraries.</Description>
4242
</ItemGroup>
4343

4444
<ItemGroup>
45-
<PackageReference Include="Open.Disposable" Version="1.2.1" />
45+
<PackageReference Include="Open.Disposable" Version="2.0.0-preview3" />
4646
<PackageReference Include="Open.Threading.Tasks" Version="1.1.3" />
4747
<PackageReference Include="System.Threading.Channels" Version="4.5.0" />
4848
</ItemGroup>

source/RecyclerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected RecyclerBase(
2323
Contract.EndContractBlock();
2424

2525
if (!(target is DisposableBase d)) return;
26-
if (d.IsDisposed) throw new ArgumentException("Cannot recycle for an object pool that is already disposed.");
26+
if (d.WasDisposed) throw new ArgumentException("Cannot recycle for an object pool that is already disposed.");
2727
d.BeforeDispose += Pool_BeforeDispose;
2828
// Could possibly dispose before this line somewhere... But that's just nasty. :P
2929
}

tests/Open.Disposable.ObjectPools.Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp2.1</TargetFramework>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
55
<RootNamespace>Open.Disposable</RootNamespace>
66
</PropertyGroup>
77

@@ -14,9 +14,9 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
18-
<PackageReference Include="MSTest.TestAdapter" Version="1.3.2" />
19-
<PackageReference Include="MSTest.TestFramework" Version="1.3.2" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
18+
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
19+
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

0 commit comments

Comments
 (0)