Set thread shutdown to false by default in Windows implementation

PiperOrigin-RevId: 501082672
This commit is contained in:
Guogang Li
2023-01-10 13:41:28 -08:00
committed by Copybara-Service
parent 2f8ecbe610
commit cf54a0fdb6
@@ -16,6 +16,7 @@
#define PLATFORM_IMPL_WINDOWS_EXECUTOR_H_
#include <atomic>
#include <memory>
#include "internal/platform/implementation/executor.h"
#include "internal/platform/implementation/windows/thread_pool.h"
@@ -32,14 +33,14 @@ class Executor : public api::Executor {
// Before returning from destructor, executor must wait for all pending
// jobs to finish.
~Executor() override {}
~Executor() override = default;
void Execute(Runnable&& runnable) override;
void Shutdown() override;
private:
std::unique_ptr<ThreadPool> thread_pool_ = nullptr;
std::atomic<bool> shut_down_;
std::atomic<bool> shut_down_ = false;
int32_t max_concurrency_;
};