mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Use BaseEventLoop._thread_id instead of a custom attribute (#124054)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
@@ -57,7 +57,7 @@ def run_callback_threadsafe[_T, *_Ts](
|
||||
|
||||
Return a concurrent.futures.Future to access the result.
|
||||
"""
|
||||
if (ident := loop.__dict__.get("_thread_ident")) and ident == threading.get_ident():
|
||||
if (ident := loop.__dict__.get("_thread_id")) and ident == threading.get_ident():
|
||||
raise RuntimeError("Cannot be called from within the event loop")
|
||||
|
||||
future: concurrent.futures.Future[_T] = concurrent.futures.Future()
|
||||
|
||||
Reference in New Issue
Block a user