Skip to content

Instantly share code, notes, and snippets.

@Fonsan
Created June 22, 2011 18:12
Show Gist options
  • Save Fonsan/1040717 to your computer and use it in GitHub Desktop.
Save Fonsan/1040717 to your computer and use it in GitHub Desktop.
class ConcurrentHashMap < Hash; end
ConcurrentHashMap.send(:include,(Module.new do
def []=(key,value)
warn 'This method is slow'
super(key,value)
end
end))
h = ConcurrentHashMap.new
h[:foo] = :bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment