How can I programmatically set the value of a kdim?

For the default slider bar of a kdim in a dynamicmap, I would like to be able to change the value of what is selected in the slider bar. How can I do that? I’m trying to define a Stream with the same name as the kdim, in this case, “ticker”

hvstream_ticker = Stream.define('Ticker', ticker=0)()
hvstream_time = Stream.define('Time', i=0)()
hvstream_alerts = Stream.define('Alerts', alerts=[None] * len(tickers))()
dmap = hv.DynamicMap(view_a, kdims='ticker', streams=[hvstream_ticker, hvstream_time, hvstream_alerts])\
        .redim.range(ticker=(0, len(tickers)-1))

def view_a(ticker, i, alerts):
    ...

But when I call hvstream_ticker.update(ticker=5) for example, I get

raise RuntimeError("_pending_writes should be non-None when we have a document lock, and we should have the lock when the document changes")

Thanks!