From 920a394539afe74f5564e58ae7f640abce3ff66b Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 26 Jun 2022 10:40:48 -0400 Subject: [PATCH] Use new `anext()` builtin --- piker/fsp/_engine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/piker/fsp/_engine.py b/piker/fsp/_engine.py index 49fe3322..94d9bfa1 100644 --- a/piker/fsp/_engine.py +++ b/piker/fsp/_engine.py @@ -114,7 +114,7 @@ async def fsp_compute( dict[str, np.ndarray], # multi-output case np.ndarray, # single output case ] - history_output = await out_stream.__anext__() + history_output = await anext(out_stream) func_name = func.__name__ profiler(f'{func_name} generated history') @@ -374,7 +374,8 @@ async def cascade( 'key': dst_shm_token, 'first': dst._first.value, 'last': dst._last.value, - }}) + } + }) return tracker, index def is_synced(