Task Scheduler in C++20. This is a header-only library.
For testing and benchmarking, additional build commands are needed.
Requirements:
- Conan (for building the tests),
- GCC v12 or higher, or Clang v13 or higher,
- Clang-format v14 or higher,
Instructions:
mkdir build
ccmake -S . -B ./build/
cd build
make
Aside from the common-sense requirements for correct, efficient and thread-safe implementation, there are functional requirements. The following requirements levels are as defined in RFC 2119.
- Support running tasks based on:
- Class member functions,
- Free functions,
- Lambda expressions.
- Support the configuration of the amount of workers.
- Support the configuration of the work queue length.
- Support the graceful handling of exceptions.
- Support deferred return value propagation for task results. (TODO)
- Support the concept of task priority. (TODO)
- Support scheduling of automatic periodic tasks. (TODO)
- Support a configurable scheduling strategy. (TODO)
- Support a mode that keeps a strict task order. (TODO)
- Support small object optimization for task objects. (TODO)
- Use
if constexpr (std::is_void_v<T>)
to detect tasks without a return value. - Integrate
std::expected
into the completion token once C++23 is around.
This project is licensed under the MIT License