From cc4c67840b7940e607d8a9020fed148a45226b67 Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Mon, 15 May 2023 10:28:19 -0700 Subject: [PATCH] Use dm.event() instead of hv.Stream workaround, https://github.com/pyviz/holoviews/issues/3564 is fixed --- adaptive/notebook_integration.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/adaptive/notebook_integration.py b/adaptive/notebook_integration.py index 165a84d82..e14055c00 100644 --- a/adaptive/notebook_integration.py +++ b/adaptive/notebook_integration.py @@ -157,15 +157,11 @@ def plot_generator(): # off a thread (and learner is not threadsafe) or block the kernel. async def updater(): - event = lambda: hv.streams.Stream.trigger( # noqa: E731 - dm.streams - ) # XXX: used to be dm.event() - # see https://github.com/pyviz/holoviews/issues/3564 try: while not runner.task.done(): - event() + dm.event() await asyncio.sleep(update_interval) - event() # fire off one last update before we die + dm.event() # fire off one last update before we die finally: if active_plotting_tasks[name] is asyncio.current_task(): active_plotting_tasks.pop(name, None)