Skip to content

Commit 3e63adf

Browse files
committed
close pool at the right time
1 parent ffe9cb7 commit 3e63adf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

zarr/tests/test_sync.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ def test_parallel_setitem(self):
7878

7979
# parallel setitem
8080
future = pool.map_async(_set_arange, zip([arr] * n, range(n)))
81-
pool.close()
8281
results = sorted(future.get(60))
82+
pool.close()
8383
pool.terminate()
8484

8585
print(results)
@@ -96,8 +96,8 @@ def test_parallel_append(self):
9696

9797
# parallel append
9898
future = pool.map_async(_append, zip([arr] * n, range(n)))
99-
pool.close()
10099
results = sorted(future.get(60))
100+
pool.close()
101101
pool.terminate()
102102

103103
print(results)
@@ -189,8 +189,8 @@ def test_parallel_create_group(self):
189189
n = 100
190190
future = pool.map_async(
191191
_create_group, zip([g] * n, [str(i) for i in range(n)]))
192-
pool.close()
193192
results = sorted(future.get(60))
193+
pool.close()
194194
pool.terminate()
195195

196196
print(results)
@@ -206,8 +206,8 @@ def test_parallel_require_group(self):
206206
n = 100
207207
future = pool.map_async(
208208
_require_group, zip([g] * n, [str(i//10) for i in range(n)]))
209-
pool.close()
210209
results = sorted(future.get(60))
210+
pool.close()
211211
pool.terminate()
212212

213213
print(results)

0 commit comments

Comments
 (0)