提交 0e1109cd 编写于 作者: H Helin Wang

Fix send op data race

std::vector<bool> is not safe for concurrent write, even to difference indices.
More discussion:
https://stackoverflow.com/questions/48452611/is-stdfuturewait-a-memory-barrier-i-can-not-explain-this-data-race
上级 7333df85
......@@ -102,7 +102,7 @@ bool RPCClient::Wait() {
return true;
}
std::vector<bool> a(req_count_);
bool a[req_count_];
std::vector<std::future<void>> waits(req_count_);
for (int i = 0; i < req_count_; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册