Not really. There is no generic way to know if the current thread already has event loop unless you are programming in some kind of a framework that guarantees that any thread has an event loop. Why do you care about threads anyway?
g
gildor
06/28/2018, 6:16 AM
Maybe just put event loop to ThreadLocal, so you can check is event loop there or not