Copied all concurrency stuff from functional-ruby into this project.