One single thread running for all the clients


I am building a news collector. Sadly, because of the API limitations of some providers, I am only able to run a single polling thread, that is supposed to share the data for all the clients that connect (this is even better in terms of performance)

Is there a way for me to have a thread, that polls all the news from all the apis, then each client sees the updated data?

Practically, I want a side-thread, independent on who’s connected

It should be noted that st.report_thread.add_report_ctx(thread) starts a thread for all of the connected clients.
Besides adding another layer of control between the api and the clients (so all the clients would call to an api that I control and then the API would collect/cache the results from each news provider and send it back to the clients) - is there a way to do that in the current streamlit implementation>?