From 053540e1993a48d5666d2c3e8ac569d499f1c808 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Fri, 27 Jul 2018 14:54:58 +0800 Subject: [PATCH] Add volatile to stopped_ member --- paddle/fluid/operators/distributed/grpc_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/distributed/grpc_client.h b/paddle/fluid/operators/distributed/grpc_client.h index 29b95fad768..0c95ffeb5ce 100644 --- a/paddle/fluid/operators/distributed/grpc_client.h +++ b/paddle/fluid/operators/distributed/grpc_client.h @@ -238,7 +238,7 @@ class GRPCClient : public RPCClient { std::mutex completed_mutex_; bool completed_; - bool stopped_; + volatile bool stopped_; }; } // namespace distributed -- GitLab