Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cgaebel/cloq
A queue of unboxed closures.
https://github.com/cgaebel/cloq
Last synced: about 1 month ago
JSON representation
A queue of unboxed closures.
- Host: GitHub
- URL: https://github.com/cgaebel/cloq
- Owner: cgaebel
- License: mit
- Created: 2014-08-23T21:53:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-27T18:18:48.000Z (about 10 years ago)
- Last Synced: 2024-05-01T19:35:14.059Z (7 months ago)
- Language: Rust
- Size: 277 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CloQ
====Have you ever wanted to express the idea of "I want to run this piece of code later" in rust?
Unless you `Box` your closures, it's very hard to create architectures based on scheduling
work to be executed later. `CloQ` fixes this.A `CloQ` is a queue of unboxed closures. It's a great basic abstraction around work queues,
and take an amortized ~10 ns to push and ~10 ns to pop on my machine. This also allows you to
avoid allocating your closures on the heap. The stack-allocated, unboxed closure will be copied
into an internal buffer when pushed, and never copied out.Please check out the rustdoc (`cargo doc` after cloning) for more information.