We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 180d636 commit 08eedaaCopy full SHA for 08eedaa
relaxed_concurrent_fifo/benchmark.h
@@ -330,7 +330,9 @@ struct benchmark_bfs : benchmark_timed<> {
330
auto old_d = distances[target].value.load(std::memory_order_relaxed);
331
while (d < old_d) {
332
if (distances[target].value.compare_exchange_weak(old_d, d, std::memory_order_relaxed)) {
333
- handle.push((static_cast<std::uint64_t>(d) << 32) | target);
+ if (!handle.push((static_cast<std::uint64_t>(d) << 32) | target)) {
334
+ throw std::runtime_error("Push failed!");
335
+ }
336
++counter.pushed_nodes;
337
break;
338
}
0 commit comments