summaryrefslogtreecommitdiff
path: root/Lib/asyncio/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/events.py')
-rw-r--r--Lib/asyncio/events.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/events.py b/Lib/asyncio/events.py
index 36b7ea307e..c7343f515c 100644
--- a/Lib/asyncio/events.py
+++ b/Lib/asyncio/events.py
@@ -636,7 +636,7 @@ class BaseDefaultEventLoopPolicy(AbstractEventLoopPolicy):
"""
if (self._local._loop is None and
not self._local._set_called and
- isinstance(threading.current_thread(), threading._MainThread)):
+ threading.current_thread() is threading.main_thread()):
self.set_event_loop(self.new_event_loop())
if self._local._loop is None: