We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceefca4 commit eccf3d1Copy full SHA for eccf3d1
core/api/api.hpp
@@ -115,13 +115,15 @@ namespace fc::api {
115
auto waitSync() {
116
std::condition_variable c;
117
Result r{outcome::success()};
118
+ bool notified = false;
119
wait([&](auto v) {
- r = std::move(v);
120
+ r = v;
121
+ notified = true;
122
c.notify_one();
123
});
124
std::mutex m;
125
auto l = std::unique_lock{m};
- c.wait(l);
126
+ while (!notified) c.wait(l);
127
return r;
128
}
129
0 commit comments