Summary
I have a multi-page app where the first page “Inputs” is used for setting various parameters, and navigating to the second page “Results” starts execution of a computationally expensive function that uses the parameters from the first page as inputs. I am experiencing a undesirable behavior where if the user decides to go back to the first page “Inputs” while the expensive function is still executing, the function does not stop to execute. Even using st.stop() or st.button() to trigger raise of an exception does not stop the function to continue executing.
Is there any way to force a function to stop executing?
Debug info
- Streamlit version: 1.27.0
- Python version: 3.10.12
- OS: Windows 11