Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created August 24, 2015 17:00
Show Gist options
  • Save anonymous/4b037e733eab09cef016 to your computer and use it in GitHub Desktop.
Save anonymous/4b037e733eab09cef016 to your computer and use it in GitHub Desktop.
def handle_job job
test = Proc.new do
puts "Im a thread and i am handling #{job}"
end
unless @workers.include? job[:id]
@workers[job[:id]] = Thread.new(&test)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment