Skip to content

Commit dab234f

Browse files
committed
fix AsyncResult.join
list of lists not passed properly to chain
1 parent 233bfe9 commit dab234f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ipyparallel/client/asyncresult.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ def join(cls, *async_results):
416416
client=first._client,
417417
fname=first._fname,
418418
return_exceptions=first._return_exceptions,
419-
children=list(chain(ar._children for ar in async_results)),
420-
targets=list(chain(ar._targets for ar in async_results)),
419+
children=list(chain(*(ar._children for ar in async_results))),
420+
targets=list(chain(*(ar._targets for ar in async_results))),
421421
owner=False,
422422
)
423423

ipyparallel/tests/test_asyncresult.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ def test_split(self):
461461
# get doubly-nested lists because these are
462462
split_results = [ar.get(timeout=10) for ar in children]
463463
assert split_results == result
464+
joined = ipp.AsyncResult.join(*children)
465+
assert joined.get(timeout=1) == result
464466

465467
def test_split_map_result(self):
466468
v = self.client.load_balanced_view()

0 commit comments

Comments
 (0)