Skip to content

Instantly share code, notes, and snippets.

@DeeJayhX
Created May 17, 2017 06:41
Show Gist options
  • Save DeeJayhX/ccea3669dde66ae6f2f48462ad58ba8b to your computer and use it in GitHub Desktop.
Save DeeJayhX/ccea3669dde66ae6f2f48462ad58ba8b to your computer and use it in GitHub Desktop.
require 'thread'
Thread.abort_on_exception = true
def addLog(x,y)
print x
puts y
end
def procA()
addLog("Stuff1", "Thing1")
end
def procB()
addLog("Stuff2", "Thing2")
end
Thread.new { loop { procA } }
Thread.new { loop { procB } }
loop{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment