feat(lxc_manager): refactor to use io_uring, smart pointers, and atomics
This commit refactors the LxcManager
class and its dependencies to improve resource management, thread safety, and asynchronous I/O handling.
Key changes include:
- io_uring Integration: The project now depends on
liburing
for efficient asynchronous I/O operations. The CMake build system is updated to find and link this library. - Resource Management: The
ContainerSession
struct now uses astd::unique_ptr
with a custom deleter (lxc_container_put
) for the LXC container. This ensures automatic and safe resource cleanup, preventing memory leaks. - Concurrency: Session ID generation is made thread-safe by using
std::atomic<SessionId>
. A newstd::atomic<bool>
flag is introduced to manage theio_uring
thread's lifecycle more safely. - Code Simplification: The
LxcManager
's internal logic is streamlined by removing redundant helper functions and a manual user data pool. - Improved Logging: Standard output and error streams are replaced with
spdlog
for more robust and configurable logging. - Build System: The CMake file is updated to use standardized source file paths and properly link against the new
liburing
dependency.