Vix.cpp v2.5.0
Vix.cpp v2.5.0 is a runtime stability release.
This release focuses on cleaner shutdown behavior, stronger async cleanup, safer HTTP server lifecycle handling, and more reliable WebSocket session writes.
A major part of this work came from debugging real issues inside a large production-style C++ application. The result is a stronger Vix runtime, especially for mixed HTTP + WebSocket applications where shutdown order, active connections, async cancellation, and detached write operations must be handled correctly.
Runtime stability
The main focus of Vix.cpp v2.5.0 is runtime stability.
The core runtime now handles App::close() more safely, improves HTTP server stop and join behavior, fixes thread shutdown ordering, and removes temporary debug traces from shutdown paths.
This matters because shutdown is one of the hardest parts of a C++ runtime. A server may still have active sessions, pending async operations, worker threads, write queues, browser connections, and internal services running when shutdown begins.
The runtime must stop in the right order.
Vix.cpp v2.5.0 strengthens that flow.
HTTP shutdown behavior
The HTTP server receives important lifecycle improvements.
This release improves server stop and join behavior, fixes thread shutdown ordering inside HTTPServer, and restores multi-threaded HTTP I/O workers after temporary debugging constraints.
Multi-threaded HTTP I/O performance is restored while keeping the safer shutdown behavior introduced during bug isolation.
The goal is to keep the runtime fast without keeping temporary debugging bottlenecks in the normal execution path.
Async runtime cleanup
The async runtime receives safer shutdown behavior.
Vix.cpp v2.5.0 improves scheduler shutdown, stabilizes the async runtime stop flow, improves asio_net_service lifecycle management, and adds safer stop/join handling for the async network service.
This is important because async cleanup must be deterministic. If the scheduler, network service, and worker threads stop in the wrong order, the runtime can expose deadlocks, dangling operations, invalid callbacks, or stuck joins.
This release makes the async shutdown path more predictable.
WebSocket lifecycle fixes
The WebSocket runtime receives several important fixes in this release. Vix.cpp v2.5.0 improves shutdown coordination in mixed HTTP + WebSocket runtimes, stabilizes low-level WebSocket server stop and join behavior, fixes session write flush lifecycle issues, and corrects session lifetime handling during detached async write operations. The write queue handling was also cleaned up, and missing write path pieces were restored. These changes are especially important for applications with repeated browser refreshes, multiple WebSocket clients, active connections during shutdown, and concurrent async writes.
Mixed HTTP + WebSocket reliability
This release significantly improves behavior in real scenarios involving:
- repeated browser refreshes
- multiple WebSocket clients
- server shutdown with active connections
- async cancellation during shutdown
- thread join ordering
- WebSocket write flush safety These are not cosmetic fixes. They target the difficult edge cases that appear when a C++ backend runtime is used in real interactive applications. A runtime that supports both HTTP and WebSocket must coordinate connection shutdown, session ownership, pending writes, and worker cleanup as one system. Vix.cpp v2.5.0 moves that behavior in the right direction.
Benchmark path improvements
Vix.cpp v2.5.0 adds a dedicated /bench fast path for benchmark builds.
The HTTP benchmark path was improved under VIX_BENCH_MODE, with benchmark-specific optimizations isolated from the standard HTTP runtime path.
This keeps benchmark measurements useful without polluting normal server behavior.
The release was benchmarked at approximately 98k requests per second on the /bench route in release benchmark mode.
The important part is separation: benchmark-specific paths remain isolated, while the normal runtime keeps its production behavior.
Build and module reliability
This release improves build consistency for modules that depend on async networking headers.
Public Asio propagation from vix::async to dependent modules was fixed, and umbrella build consistency was improved for modules using async networking.
Conditional compilation paths for benchmark-only helpers were also cleaned up, and warning noise was reduced in core and platform-specific sources.
These changes strengthen the modular build system and reduce accidental breakage across dependent modules.
Process module cleanup
The process module receives platform-specific cleanup.
Vix.cpp v2.5.0 fixes POSIX platform warnings, improves non-Linux helper isolation in process spawning internals, and cleans up noreturn, unused parameter, and unused helper issues.
This keeps stricter builds cleaner and makes platform-specific process code easier to maintain.
Highlights
- Stabilized
App::close()shutdown flow. - Improved HTTP server stop and join behavior.
- Fixed thread shutdown ordering in
HTTPServer. - Restored multi-threaded HTTP I/O workers.
- Improved scheduler shutdown behavior.
- Stabilized async runtime stop flow.
- Improved
asio_net_servicelifecycle management. - Added safer stop/join handling for the async network service.
- Fixed shutdown issues in mixed HTTP + WebSocket runtimes.
- Improved
AttachedRuntimeshutdown coordination. - Stabilized WebSocket server stop and join behavior.
- Fixed WebSocket session write flush lifecycle issues.
- Fixed session lifetime issues during detached async write operations.
- Restored missing WebSocket write path pieces.
- Cleaned up WebSocket write queue handling.
- Added a dedicated
/benchfast path for benchmark builds. - Improved the HTTP benchmark path in
VIX_BENCH_MODE. - Fixed public Asio propagation from
vix::asyncto dependent modules. - Improved umbrella build consistency for async networking modules.
- Reduced warning noise in core and platform-specific sources.
- Fixed POSIX platform warnings in the process module.
Compatibility
Vix.cpp v2.5.0 introduces no breaking changes. If you use Vix for HTTP + WebSocket applications, this release is recommended. It contains important fixes for shutdown stability, session write handling, async runtime cleanup, and mixed HTTP + WebSocket lifecycle behavior. Existing applications should continue to work normally while benefiting from safer runtime cleanup and more predictable shutdown behavior.
Notes
Vix.cpp v2.5.0 is a reliability-focused release. It was heavily validated through real debugging sessions on a large C++ codebase with complex concurrency behavior. Several difficult bugs were tracked down, including shutdown ordering problems, deadlocks, invalid session lifetime handling, async cleanup issues, and WebSocket write lifecycle problems. This release strengthens the Vix runtime where it matters most: under real server pressure, active connections, repeated reloads, concurrent sessions, and shutdown conditions.