Skip to content

Commit

Permalink
Use dm.event() instead of hv.Stream workaround, holoviz/holoviews#3564
Browse files Browse the repository at this point in the history
…is fixed
  • Loading branch information
basnijholt committed May 15, 2023
1 parent c22ea54 commit cc4c678
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions adaptive/notebook_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc4c678

Please sign in to comment.