Hi @HWiese1980
I can’t repro the issue when I try the toy example below. Is this more or less what you’re doing on your end?
import streamlit as st
from streamlit import ReportThread
from threading import Thread
import time
SLEEP_TIME = 0.01
ctx = ReportThread.get_report_ctx()
def print_numbers(thread_id):
ReportThread.add_report_ctx(None, ctx)
output = st.text("")
for n in range(1000):
output.text("Thread %s: %s" % (thread_id, n))
time.sleep(SLEEP_TIME)
thread = Thread(target=print_numbers, args=(2,))
thread.start()
print_numbers(1)