Transcript#
This transcript was generated automatically and may contain errors.
We recently introduced concurrent async in shiny 1.9. Let me show you what that looks like.
I refresh this dashboard. These three values arrive in about one second, even though each query waits for one second. The waits overlap. This is concurrent async.
even though each query waits for one second. The waits overlap. This is concurrent async.
Compare that to running the same dashboard in shiny 1.8. In the older version, the outputs finish one after another versus how they all finish together in 1.9. This is how you would write the query. This sleep stands in for an asynchronous request. It yields control while it waits. Each output awaits the same query function that lets shiny start the other outputs while a request is waiting. The same change also helps separate users. A waiting async output no longer holds up the other sessions in the process. However, there is a limit. A blocking function still holds the event loop. To address this, use an asynchronous client when your library provides one. And if a blocking column must run in a worker thread, an extended task can keep the same session responsive too. Have you ever used concurrent async before?