Closed vangorra closed 4 years ago
@pavoni : This looks good to me. Thoughts?
Sorry for being very slow on this. It certainly all looks good - I was hoping to find the time to test it out just to double check before merging, but I haven't yet found the time.
@alanfischer if you've already tested it - then I'm very happy to merge and release.
It's certainly a great improvement to my terrible way of managing the event loop thread!
Now released as 0.3.7. Thanks for the contribution - and sorry for the delay.
This should fix test timeout issues in https://github.com/home-assistant/home-assistant/pull/28340
Using thread events instead of time.sleep() for the loop to ensure the loop ends almost immediately after calling stop().