Skip to content

Instantly share code, notes, and snippets.

@eggie5
Created July 8, 2012 00:36
Show Gist options
  • Select an option

  • Save eggie5/3068799 to your computer and use it in GitHub Desktop.

Select an option

Save eggie5/3068799 to your computer and use it in GitHub Desktop.
threads = [];
threads << Thread.new { funcA };
threads << Thread.new { funcB };
threads.each { |t| t.join(0.1) } while true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment