Multithreading in Streamlit

Summary

I’m trying to get a function which updates the st.plotly graph to run in background while the other code executes and I’m not sure how to do it and if it’s even possible.
python 3.10
Streamlit 1.19