百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Q

qthreads

> 编程语言
开源

轻量级的本地感知用户级线程运行时。

200 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

轻量级的本地感知用户级线程运行时。

QTHREADS

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):

bash
mkdir build
cd build
cmake ..
make -j

Issues· 39 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cscr-1053snl-prog-models-runtimes

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言