Hello! I have been using bokeh for quite some time now but wanted to move to panel given the large amount of visual tools. I have been relying heavily on the async capabilities of bokeh and now I am struggling with replicating some behaviours in Panel.
Following this tutorial Async and Concurrency — Panel 0.13.0a5 documentation I managed to get an async callback on button click working. The note below says I should be able to also run an async callback using pn.state.add_periodic_callback. I have tried that as in the example below but the async function doesn’t seem to be called. Am I missing something? Code is being run in jupyter.
import panel as pn import asyncio pn.extension() text = pn.widgets.StaticText(value="test") async def test(): print("halo") text.value = "halo" await asyncio.sleep(1) text.value = "halo2" pn.state.add_periodic_callback(test, period=2000) pn.Row(text).servable()