Created
February 13, 2019 03:40
-
-
Save hankliu5/b6b0ac7fb2894b0b0e52dd39075ca520 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
array = Array.new() | |
t1 = Thread.new { array.append(4) } | |
t2 = Thread.new { array.append(7) } | |
t1.join | |
t2.join | |
puts array.size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment