- streamlit code
- sync & can work in any thread
- sync & expects a ScriptThread
- (AFAIK streamlit has no async API)
- user code, including libs
- sync
- CPU intensive -> worker? (maybe process worker)
- IO wait -> run in worker thread, reape as
cf.FutureorAwaitable
- async
- CPU intensive -> run in a different loop won't help
- IO wait: not a problem
- sync
- run sync function in worker thread AND pass ScriptContext
- run sync function in worker thread AND get an Awaitable to not block as
PageRunSignala signal variable to capture 'page is running'SessionSignala signal variable to capture 'page is running'
cf.Task
asyncio