rsyscall is a thread library for Linux.
For a short introduction to the concepts and motivation behind rsyscall, read the conceptual introduction. If you want to learn more, or want to immediately see examples, continue on to read the tutorials.
We’ll explain rsyscall in two separate tutorials: The single-threaded tutorial and the multi-threaded tutorial.
Note that the rsyscall Python API uses some recent Python 3 features: async/await and type annotations. If you haven’t seen those before, read the background tutorial.
The single-threaded tutorial explains how to do things with only a single thread, without creating more. The single-threaded interface is fundamentally similar to normal Python, though with a novel, significantly expanded, and more low-level interface to Linux.
The multi-threaded tutorial explains the interface to creating and using multiple threads, including explaining exactly what “thread” means in rsyscall, as well as some operations which only make sense with multiple threads.
Note that this division is purely for convenience; the “multi-threaded” portions of rsyscall are not really distinct from the “single-threaded” portions.