Load Multiple st.container's in parallel

Summary

Is it possible to load multiple st.container’s in parallel?

Steps to reproduce

Code snippet:

with st.container():
   st.write("This is inside the container")

   # You can call any Streamlit command, including custom components:
   st.bar_chart(np.random.randn(50, 3))

with st.container():
   st.write("This is inside the container")

   # You can call any Streamlit command, including custom components:
   st.bar_chart(np.random.randn(50, 3))

with st.container():
   st.write("This is inside the container")

   # You can call any Streamlit command, including custom components:
   st.bar_chart(np.random.randn(50, 3))

If applicable, please provide the steps we should take to reproduce the error or specified behavior.

Expected behavior:

The containers should load all in parallel

Actual behavior:

The containers get loaded one-by-one as the compiler progresses reading the code.

Hi @AnujPhoenix ,

Streamlit doesn’t provide multi processing.

You have to implement multithreading using python.

For e.g.
https://www.reddit.com/r/Streamlit/comments/12xebab/multiprocessing_in_streamlit/

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