qthreads for Mac
Lightweight locality-aware user-level threading runtime
qthreads — overview
The Qthreads API is designed to make using large numbers of threads convenient and easy. The Qthreads API also provides access to full/empty-bit (FEB) semantics, where every word of memory can be marked either full or empty, and a thread can wait for any word to attain either state.
Qthreads is essentially a library for spawning and controlling stackful coroutines: threads with small (4-8k) stacks. The exposed user API resembles OS threads, however the threads are entirely in user-space and use their locked/unlocked status as part of their scheduling.
The library's metaphor is that there are many Qthreads and several "shepherds". Shepherds generally map to specific processors or memory regions, but this is not an explicit part of the API. Qthreads are assigned to specific shepherds and are only allowed to migrate when running on a scheduler that supports work stealing or when migration is explicitly triggered via user APIs.
The API includes utility functions for making threaded loops, sorting, and similar operations convenient.
There is also an experimental interface for qthreads using C++26 senders under development at https://github.com/sandialabs/qthreads-stdexec.
Collaboration
Need help or interested in finding out more? Join us on our Slack channel: https://join.slack.com/t/Qthreads/signup
Compatibility
Millions of Qthreads should run fine even on a machine with a modest amount of RAM. Generally the primary limit to the number of threads that can be spawned is memory use.
This library has been tested, and runs well, on 64-bit ARM and X-86 machines. 32-bit versions of those architectures as well as PowerPC-based architectures may also work.
This library is compatible with most Linux variants as well as OSX. There is some preliminary support for BSD operating systems. Windows is not currently supported.
Building Qthreads
CMake 3.23 or later is required for building from source. Hwloc is also highly recommended.
The following compilers are supported and tested regularly: gcc 9 or later clang 14 or later icc (last supported release) icx 2024 or later aocc 4.2 or later acfl 24.10 Apple clang 15 or later nvc 24.9
To configure and build from source you can run (in the source directory):
Details
轻量级本地感知用户级线程运行时
How to install qthreads
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-02-11; current version 1.23, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| 1.23 | 2026-02-11 | Stable | — | — | — | — |
| 1.22 | 2025-02-26 | Stable | — | — | — | — |
| 1.21 | 2024-09-30 | Stable | 952 KB | — | — | — |
| 1.20 | 2024-05-02 | Stable | 1.2 MB | — | — | — |
| 1.19 | 2023-08-29 | Stable | 1.2 MB | — | — | — |
| 1.23-rc1 | 2026-01-29 | Pre-release | — | — | — | — |
| 1.22-rc1 | 2025-02-18 | Pre-release | — | — | — | — |
| 1.21rc1 | 2024-09-27 | Pre-release | 952 KB | — | — | — |
| 1.20rc1 | 2024-04-02 | Pre-release | — | — | — | — |
| 1.19RC | 2023-08-28 | Pre-release | 1.2 MB | — | — | — |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- Apple silicon · latest macOS
- Apple silicon · macOS 26 Tahoe
- Apple silicon · macOS 15 Sequoia
- Apple silicon · macOS 14 Sonoma
- Intel · macOS 14 Sonoma
- Linux · ARM64
- Linux · x86_64
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| qthreads | 1.23 | BSD-3-Clause | CLI | 1 |
| glui | 2.37 | Zlib | CLI | 1 |
| pear | 3.0.0 | Apache-2.0 | CLI | 1 |
| loudmouth | 1.5.4 | LGPL-2.1-or-later | CLI | 0 |
Similar apps: Command-line Tools
glui
Welcome to the GLUI User Interface Librarypear
Pear is a peer-to-peer application runtime whose core idea is to free apps from reliance on…loudmouth
loudmouth is a lightweight C library for the Jabber (XMPP) protocol, intended mainly for…lutok
Welcome to the Lutok project!openliberty-jakartaee9
Open Liberty is a lightweight runtime for Java developers, specifically designed to support…openssl@4
Cryptography and SSL/TLS ToolkitCategories: Command-line Tools