I am running this code. It will run a loop inside another thread. When the value is even, it will display one warning, when its odd, it will display another warning. But it displays only 1 warning message.
import threading
import streamlit as st
from streamlit.runtime.scriptrunner import add_script_run_ctx
import time
def find():
l=0
while True:
if l%2 == 0:
st.warning('App is being updated')
else:
st.warning('App can be used')
l=(l+1)%2
time.sleep(2)
st.header('Basic Threading')
t1 = threading.Thread(target = find)
add_script_run_ctx(t1)
t1.start()