mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Set thread shutdown to false by default in Windows implementation
PiperOrigin-RevId: 501082672
This commit is contained in:
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_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user