Thanks to visit codestin.com
Credit goes to github.com

Skip to content

benb/executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple thread pool for Ruby. Not well tested, but seems to work. Released under the "MIT" license


example script, using 10 threads to print out numbers from 1..100 alongside the thread's name


require "rubygems"
require "executor"

x = ExecutorService.new(10)
(1..100).each{|i| x.submit(i){|j| puts Thread.current.to_s  + " " + j.to_s}}
x.join

About

Trivially small thread pool implementation for Ruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages