Skip to content

Instantly share code, notes, and snippets.

@didactic-drunk
Created September 12, 2019 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save didactic-drunk/a7e6bb358e45cfa1e9f5f074cc415b37 to your computer and use it in GitHub Desktop.
Save didactic-drunk/a7e6bb358e45cfa1e9f5f074cc415b37 to your computer and use it in GitHub Desktop.
Array of Atomics
class C
end
ary = Array(Atomic(C?)).new(4, Atomic(C?).new(nil))
ary[0].set C.new
# Should not be nil
p ary[0].get
p ary[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment