uvloop icon indicating copy to clipboard operation
uvloop copied to clipboard

[feature request] add loop._run_once and loop._set_is_runnning api to easy the process of OS gui event loop integrate

Open congzhangzh opened this issue 10 months ago • 1 comments

  • uvloop version: latest

  • Python version: 3.11.2

  • Platform: All, and testing on Linux

  • Can you reproduce the bug with PYTHONASYNCIODEBUG in env?: n.a

  • Does uvloop behave differently from vanilla asyncio? How?: no

  • Purpose: Add a public API to

  1. setting running state
  2. allow run_once of event loop
  • Background:

I want to pull the event from backend_fd from another process and process them on os GUI event loop which like electron, but uvloop has no public API to run_once and keep _is_running

  • Refs:
  1. https://discuss.python.org/t/connecting-asyncio-and-tkinter-event-loops/14722/9
  2. https://github.com/congzhangzh/webview_python/issues/1

congzhangzh avatar Nov 30 '24 11:11 congzhangzh