I've been using this SSEClient Python library with the following code:
client = SSEClient(url)
for event in client:
func(json.loads(str(event)))
This is being run inside a thread. My problem is that I want to end this thread, but when I was attempting to use stop flags, it would only run when an event had been received (as I assume the iterator is waiting on the next item).
Does anyone have any suggestions on how to end this thread without another event having to occur?
Thank you!