This project delivers a modern, extensible asynchronous event scheduler in C++20, designed for real-time systems and seamless C/C++ interoperability.
- Dynamic event scheduling and management at runtime
- C and C++ integration via
void*handlers and interfaces - interval, and delayed event execution
- Comprehensive state machine for event lifecycle
- Automatic timeout, retry
- Multiple independent scheduler instances
- Fast event lookup and management
- Extensive unit tests with Catch2
- Ready for CLion, VSCode, Docker, and CI/CD pipelines
- Add/remove events dynamically at runtime
- C/C++ compatible event handlers (
void*and interfaces) - Priority, interval, and delayed event execution
- State machine per event:
Ready,Waiting,Running,Done,Failed,Timeout,Paused
- Automatic timeout, retry, and dependency management
- Pause/resume and abort events dynamically
- Multiple independent scheduler instances
- Fast event lookup and management
- CLion: Fully supported
- Visual Studio Code: Build, debug, IntelliSense ready
- Docker: Build and run in container
- GitHub Actions CI: Automatic build, test, validate
/ProjectRoot
├── CMakeLists.txt # CMake build script
├── Dockerfile # Build project in Docker
├── README.md # This documentation
├── include/ # C++ event scheduler headers
├── src/ # Main application
├── test/ # Catch2 unit tests
└── .github/
└── workflows/
└── ci.yml # GitHub Actions CI/CD pipeline
mkdir build
cd build
cmake ..
make
./mainmkdir build
cd build
cmake ..
make
ctest --verbosedocker build -t scheduler_project .
docker run --rm scheduler_project- Open the project folder in your IDE.
- Configure CMake profile if needed.
- Build and run/debug as usual.
class MyController : public IController {
void handleEvent() override { /* ... */ }
void stopEvent() override { /* ... */ }
void abortEvent() override { /* ... */ }
};
class MyUserData : public IUserData {
uint32_t getEventType() const override { return 1; }
std::any getUserParameter() const override { return std::string("param"); }
};Scheduler scheduler;
auto controller = std::make_shared<MyController>();
auto userData = std::make_shared<MyUserData>();
EventConfig config{/* delay, serve, life, callbacks... */};
auto event = scheduler.pushEvent(controller, userData, config);
scheduler.start();
scheduler.service();
scheduler.terminate();- CMake ≥ 3.15
- C++20 compiler
- spdlog (for logging)
- Catch2 (for unit testing)
- Every push/pull request:
- Auto build via CMake
- Auto run unit tests (Catch2)
- Validate before merge
Workflow file: .github/workflows/ci.yml
- Code coverage reporting
- Auto retry with backoff
- Event progress reporting
- Event queue for inter-event communication
- Group event execution pipelines
- Full documentation website
Alexander Sacharov and contributors