MagicStack / MagicStack/uvloop

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

Open
#648 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Cython
Stars
11.9k
Forks
616
PR merge metrics
No merged PRs in 30d

Description

  • 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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the requested loop._run_once and loop._set_is_runnning entry points, along with the backend_fd integration described in the issue. Read the linked asyncio/Tkinter discussion to understand the proposed event-loop interaction. Done requires a decided public API that supports setting running state and running one iteration for OS GUI integration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.