Warning
This is very much a work in progress and is not ready for use quite yet.
Narrows is a C++ channel library providing efficient and easy-to-use communication channels for concurrent programming. This library was a chance for me to learn more personally about cross thread channels, and you probably want to make sure you consider the tradeoffs I've made before using it for your project. Once I'm done with it, this README will give a good introduction to narrows, but for more information I'd suggest poking around the docs folder, as it has some writing on the history and design of narrows and can give you an idea of where the library came from.
-
Bounded channel: A channel with a fixed capacity
auto [s, r] = nrws::bounded<int>(10);
-
Unbounded channel: A channel with no upper bound on its capacity
auto [s, r] = nrws::unbounded<int>();
- Bounded channel
- [Add tradeoffs here]
- Unbounded channel
- [Add tradeoffs here]
[Provide installation instructions here]
// Example code for using a bounded channel
// Example code for using an unbounded channel
[Provide a brief overview of key classes and functions]
[Include any performance metrics or comparisons]
[Instructions for contributors]
[Specify the license]
- Inspired by andreiavrammsd/cpp-channel
- Inspired by Rust's Crossbeam library
- [Any other acknowledgements]