Multithreading in st.tabs

  1. Are you running your app locally or is it deployed? - Deployed
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform? - Own hosting platform backed up by Kubernetes
    b. Share the link to the public deployed app. - It is not publicly accessible
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot). - Please refer below
  5. Share the Streamlit and Python versions. - Python 3.7 & Streamlit 1.27.2

The issue we are experiencing -
We are developing an application using Streamlit which has 4 tabs (st.tabs). Each tab is responsible for displaying certain report or data. Each tab has respective method to execute and process the data sequentially and taking longer time to meet stakeholder expectation. Recently I have implemented multithreading so that each tab process data parallely, during my implementation I have noticed that sometimes contents of the each tab has mixed up with the other tab and creates unintentional misinformation to the stakeholder. To handle this issue I have added little delay between two thread invocation - which I believe is not a sophisticated way to handle this issue. I would like to know your thoughts on this and looking forward much more sophisticated suggestions/solutions. [e.g. Before adding delay invocation looks like thread1()thread2()thread3()… ; after adding delay invocation looks like thread1()sleep(3)thread2()sleep(3)thread3()]. Looking forward to your response. Thanks in advance!

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