python-trio / python-trio/trio

Consider supporting POSIX aio for disk I/O (mostly useful for FreeBSD)

Open
#1,953 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

Since trio seems to be growing support for the Linux specific io_uring including its async disk I/O features, what about POSIX aio support?

To might knowledge only FreeBSD (and possibly NetBSD) implements this in a useful, in kernel manner. Otherwise its usually user space threads managed by the systems C library, which is probably not much better than the current implementation.

If started on CFFI bindings at /wagnerflo/aiosix including an example how to use this with kqueue. Other operating systems would need to use other sigevent request completion notification mechanism (SIGEV_SIGNAL with a self-pipe or signalfd probably).

Contributor guide

Open the contributing guide

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 reading the referenced aiosix CFFI bindings and its example.py, especially the kqueue-based completion flow. Then compare that approach with Trio's existing io_uring support and identify the platform-specific entry points and tests needed; the issue does not name Trio files or define a completion criterion.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.