From 02c3ea174388efc0cc28e836b081289ab8793369 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 4 Jan 2023 23:15:45 -0500 Subject: [PATCH] Use `open_sample_stream()` in display loop --- piker/ui/_display.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/piker/ui/_display.py b/piker/ui/_display.py index b4a380b7..1263da2b 100644 --- a/piker/ui/_display.py +++ b/piker/ui/_display.py @@ -43,7 +43,10 @@ from ..data.types import Struct from ..data._sharedmem import ( ShmArray, ) -from ..data._sampling import _tick_groups +from ..data._sampling import ( + _tick_groups, + open_sample_stream, +) from ._axes import YAxisLabel from ._chart import ( ChartPlotWidget, @@ -194,7 +197,7 @@ async def increment_history_view( # wakeups/ctx switches verus logic checks (as normal) # - we need increment logic that only does the view shift # call when the uppx permits/needs it - async with hist_viz.flume.index_stream(int(1)) as istream: + async with open_sample_stream(1.) as istream: async for msg in istream: # l3 = ds.viz.shm.array[-3:]