[pygobject/benzea/gio-asyncio] test
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/benzea/gio-asyncio] test
- Date: Fri, 19 Nov 2021 16:07:04 +0000 (UTC)
commit 156b0e3490f5cef31ca473c024a5d1de672a9941
Author: Benjamin Berg <bberg redhat com>
Date: Fri Nov 19 16:43:51 2021 +0100
test
gi/events.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gi/events.py b/gi/events.py
index 3b910298..67a43463 100644
--- a/gi/events.py
+++ b/gi/events.py
@@ -239,7 +239,7 @@ class GLibEventLoopPolicy(events.AbstractEventLoopPolicy):
import traceback
print("getting loop")
- traceback.print_stack(limit=5)
+ traceback.print_stack(limit=5, file=sys.stdout)
# Get the thread default main context
ctx = GLib.MainContext.get_thread_default()
@@ -256,12 +256,15 @@ class GLibEventLoopPolicy(events.AbstractEventLoopPolicy):
# Note: We cannot attach it to ctx, as getting the default will always
# return a new python wrapper. But, we can use hash() as that returns
# the pointer to the C structure.
+ print(f"ctx={0x{hash(self._context):X}")
try:
loop = self._loops[ctx]
if not loop.is_closed():
print(f"got existing loop {loop}")
return loop
+ print(f"loop {0x{loop} is closed")
except KeyError:
+ print("no loop for context")
pass
self._loops[ctx] = GLibEventLoop(ctx)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]