If your eltype has support for native atomic operations then it will be pretty free (locks are at least a word, but atomic fields are free for supported types). It sounds like 1.11 AtomicMemory or Atomix.jl is what you want then.
1 Like