Question about atomics

HTH:

You could use memory_order_relaxed to minimize the cost, but you need to fully understand it.

If not, just use default std::atomic and think about optimization later.

1 Like