[pygobject/benzea/gio-asyncio] fixup! events: Implement asyncio event loop based on glib
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/benzea/gio-asyncio] fixup! events: Implement asyncio event loop based on glib
- Date: Fri, 19 Nov 2021 17:07:38 +0000 (UTC)
commit b7a7e3715353fc52a2cb81c3684080cb14248797
Author: Benjamin Berg <bberg redhat com>
Date: Fri Nov 19 18:07:17 2021 +0100
fixup! events: Implement asyncio event loop based on glib
gi/events.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/events.py b/gi/events.py
index ac675f8c..3d6f9d82 100644
--- a/gi/events.py
+++ b/gi/events.py
@@ -289,8 +289,8 @@ class GLibEventLoopPolicy(events.AbstractEventLoopPolicy):
if loop is None:
# We do permit unsetting the current loop/context
- old = self._loops.pop(ctx, None)
- if old and old._context != ctx:
+ old = self._loops.pop(hash(ctx), None)
+ if old and hash(old._context) != hash(ctx):
warnings.warn('GMainContext was changed unknowingly by asyncio integration!', RuntimeWarning)
elif old and ctx_td:
GLib.MainContext.pop_thread_default(ctx_td)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]