1
5
Fork
You've already forked takeaway
0
An efficient work-stealing task queue library for Rust.
  • Rust 98.9%
  • Python 1.1%
2026年05月12日 18:19:08 +02:00
assets Update benchmarks 2026年04月04日 19:01:36 +02:00
benches Unify Criterion benchmarks 2025年08月09日 20:38:07 +02:00
examples Implement one-shot mode 2025年08月06日 01:20:58 +02:00
LICENSES Set up infrastructure 2025年06月22日 00:56:44 +02:00
src Set enqueuer waker when going to sleep 2026年05月12日 18:17:19 +02:00
tests Implement one-shot mode 2025年08月06日 01:20:58 +02:00
.gitignore [.gitignore] Add profiling-related files 2025年08月09日 23:25:26 +02:00
Cargo.lock Bump to version 0.1.4 2026年05月12日 18:19:08 +02:00
Cargo.toml Bump to version 0.1.4 2026年05月12日 18:19:08 +02:00
Changelog.md Bump to version 0.1.4 2026年05月12日 18:19:08 +02:00
README.md Update benchmarks 2026年04月04日 19:01:36 +02:00
REUSE.toml Note 'crossbeam-utils' code in license talk 2025年07月19日 00:34:01 +02:00
rustfmt.toml Set up infrastructure 2025年06月22日 00:56:44 +02:00

takeaway: High-performance task queues

takeaway is a Rust library providing a high-performance, work-stealing task queue data structure. It is perfect for task architectures where:

  • There may be thousands of tasks ready to run at any time.
  • Tasks are small, synchronous, and CPU-bound.
  • All available CPUs should be used to maximum capacity.
  • (Optional) Some tasks have a higher priority than others.
  • (Optional, coming soon) Grouping certain tasks lets them be executed efficiently.

takeaway tries to provide the lowest overhead possible. It is designed from the ground up to process everything in batches; this amortizes synchronization costs and makes way for interesting features like task prioritization.

Alternatives

crossbeam-deque is a popular Rust crate which also provides work-stealing task queues. However, takeaway provides a higher-level API with more features and comparable (if not better) performance.

These benchmarks were recorded on a 16-thread AMD Ryzen 7 7840U (Zen 4; CPU boost disabled), and can be reproduced by the manual benchmark. Only results up to 8 threads were recorded to avoid contention with other system processes.

Origin

takeaway was developed for krabby, an experimental Rust compiler, due to the feature limitations of crossbeam-deque. It is offered as a standalone crate in the hope that it may prove useful for other highly-parallel and CPU-intensive applications.

License

Copyright (C) 2025 arya dradjica (uhe8ob7m71igsl1d@bal-e.org)

takeaway is available under the MIT or Apache-2.0 licenses, at your option. Their terms are available in LICENSES/MIT.txt and LICENSES/Apache-2.0.txt respectively.

In addition, some code from crossbeam-utils has been vendored in, under the MIT or Apache-2.0 licenses. See REUSE.toml.