Simple concurrency constructs in ruby to compare implementations in Rails