Simple ruby code to execute tasks in several threads.