Skip to content

Modernize to C++23 with std::async

This merge request modernizes a C++ metrics collection application to use the latest C++23 programming language features. The main changes include:

Core Modernization: Updated the build system to require newer compilers and C++23 standard, enabling advanced programming features like coroutines (functions that can pause and resume execution) and parallel processing capabilities.

Async Programming: Transformed the application from blocking operations to non-blocking ones using coroutines and async programming. This means the app can now collect metrics from multiple sources simultaneously rather than waiting for each one to complete before moving to the next.

New Task System: Added a custom AsyncTask class that provides a clean interface for handling asynchronous operations, making the code more maintainable and efficient.

Enhanced Components: Updated all major components (metrics collector, sensor readers, data sources) to support both the old synchronous methods and new async methods, ensuring backward compatibility while enabling performance improvements.

Performance Improvements: The application can now collect data from multiple sensors and endpoints in parallel, use lock-free programming techniques for better performance, and handle I/O operations without blocking the main program flow.

Documentation: Added comprehensive documentation explaining the new C++23 features, build requirements, and usage patterns.

The changes maintain full backward compatibility while providing a modern foundation for better performance and scalability.

Merge request reports

Loading