[cdc_stream] Implement stop-service command (#29)

Implements cdc_stream stop-service. Also fixes an issue in the
BackgroundService implementation where Exit() would deadlock since
server shutdown waits for all RPCs to exit.
This commit is contained in:
Lutz Justen
2022-12-02 19:39:13 +01:00
committed by GitHub
parent 1120dcbee0
commit 90717ce670
8 changed files with 149 additions and 4 deletions

View File

@@ -17,6 +17,9 @@
#ifndef CDC_STREAM_BACKGROUND_SERVICE_IMPL_H_
#define CDC_STREAM_BACKGROUND_SERVICE_IMPL_H_
#include <memory>
#include <thread>
#include "absl/status/status.h"
#include "cdc_stream/background_service_impl.h"
#include "cdc_stream/session_management_server.h"
@@ -52,6 +55,7 @@ class BackgroundServiceImpl final
private:
ExitCallback exit_callback_;
std::unique_ptr<std::thread> exit_thread_;
};
} // namespace cdc_ft