The mechanisms are:
- Atomics
const _var = @atomicLoad(@TypeOf(some_var), &some_var, .seq_cst);
- doNotOptimizeAway See: How to use std.mem.doNotOptimizeAway?
- volatile Note: Benchmarking isDigit - #17 by andrewrk
The mechanisms are:
const _var = @atomicLoad(@TypeOf(some_var), &some_var, .seq_cst);