How to avoid for loops interrupting the code that follows

Summary

Simple issue.
Do something (works)
for loop
Do something else (this will run only after the for loop is completed)
Since I’m trying to create a dynamic dashboard that is being fed with live data, if for loops will stop Do something else from running, I’ll get into lots of trouble hehe

Expected behavior:
I’d like everything to run concurrently so that the charts, progress bars, tables, etc are updated every time new data is received.

Actual behavior:
Do something runs
for loop runs
Do something else runs but only after for loop finished

Debug info

  • Streamlit version: 1.2
  • Python version: 3.10.0
  • OS version: Windows Pro 10
  • Browser version: Chrome

Hi @Ivan_Schuster streamlit is always run from top to down on refresh. Could you provide some code that would allow to visualise your issue?

PS. st.spinner - Streamlit Docs ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.