Skip to content

Instantly share code, notes, and snippets.

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
@ms-tg
ms-tg / gist-1.rb
Created October 18, 2012 18:13 — forked from rondale-sc/gist-1.rb
try_and_try_again
class Project
attr_reader :supervisor
# assume supervisor looks like:
# ["Harry", "Henderson", "hhendersonfake@me.com"]
def initialize(supervisor)
@supervisor = supervisor
end