Finish one task first
Start with submit_auto(lambda) and future.get(); you do not need to understand thread pools, GPUs, or real-time scheduling first.
One facade for ordinary async tasks, low-latency queues, periodic realtime threads, blocking I/O, and optional GPU work. Start from submit_auto().
auto& executor = executor::Executor::instance();
auto answer = executor.submit_auto([] { return 42; });
std::cout << answer.get() << '\n';
executor.shutdown();get() both retrieves the result and rethrows an exception from the task. See your first task for complete code and expected output.
Executor is not a coroutine runtime, a distributed messaging system, or a hard realtime OS. It cannot safely force arbitrary running C++ functions to terminate, and submit_periodic() is soft periodic work on the ordinary pool, not a dedicated realtime thread. See what is Executor? for the complete boundary statement, including the synchronization guarantees introduced in 0.4.0.
docs/API.md.| Item | Current support |
|---|---|
| Platform | Linux, Windows; Android CPU-only via NDK |
| Language | C++20 |
| Build system | CMake 3.16+ |
| Version | v0.5.0 |
| License | MIT |