Connecting Asyncio and Tkinter event loops?

First, need some help on libuv & python micro task process

I feel a simple PEP to guide the eventloop implement and gui message loop should works, and should works with all UI framework like QT/GTK/Win32/TK/Mac, some implement like pyside is very trick and too bad!

My prototype is work in progress, I make it work in some version, which use timely poll, which is bad!

I try to use semaphore to make a better one, it’s broken, should be fixable in the next step!

Btw,

  1. I use uvloop and Linux to test the idea
  2. I fork uvloop and create a custom version
  3. Integration to Ui loop should be easy, it seems all ui framework provides some utility to callback on ui thread, and support hook the message loop to do something at each loop,We need this to process microtask(loop’s ready queue)