This file contains hidden or 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
| require 'hamster' | |
| require 'hamster/experimental/mutable_hash' | |
| # a bunch of threads with a read/write ratio of 10:1 | |
| num_threads = 100 | |
| num_reads_per_write = 10 | |
| num_loops = 500 | |
| hsh = Hamster.mutable_hash | |
| puts RUBY_DESCRIPTION |
This file contains hidden or 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
| class Project | |
| attr_reader :supervisor | |
| # assume supervisor looks like: | |
| # ["Harry", "Henderson", "[email protected]"] | |
| def initialize(supervisor) | |
| @supervisor = supervisor | |
| end |