Worker thread for accepting incoming DICOM connections.
Worker thread for accepting incoming DICOM connectionsThe accept_worker class provides a thread_base-based implementation for the DICOM server's accept loop. It manages:
- TCP socket listening (placeholder for future network_system integration)
- Graceful shutdown via stop token
- Integration with thread_system's lifecycle management
This class replaces direct std::thread usage in dicom_server, providing:
- jthread support when USE_STD_JTHREAD is defined
- Cancellation token integration
- Thread monitoring compatibility
- Consistent architecture with thread_system
- Note
- Current implementation is a placeholder that signals readiness for network_system TCP integration. The actual socket accept logic will be implemented when network_system provides TCP server support.
in dicom_server
accept_worker_ = std::make_unique<detail::accept_worker>(
config_.port,
[this](uint64_t session_id) {
},
[this]() {
check_idle_timeouts();
}
);
accept_worker_->set_wake_interval(std::chrono::milliseconds(100));
auto result = accept_worker_->start();