Skip to content

Commit 053540e

Browse files
committed
Add volatile to stopped_ member
1 parent b78ffde commit 053540e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/operators/distributed/grpc_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ class GRPCClient : public RPCClient {
238238
std::mutex completed_mutex_;
239239
bool completed_;
240240

241-
bool stopped_;
241+
volatile bool stopped_;
242242
};
243243

244244
} // namespace distributed

0 commit comments

Comments
 (0)