Skip to content

Instantly share code, notes, and snippets.

@marzdgzmn
Created January 5, 2018 03:37
Show Gist options
  • Save marzdgzmn/d317e286d4cc4a087c3d811d252f6300 to your computer and use it in GitHub Desktop.
Save marzdgzmn/d317e286d4cc4a087c3d811d252f6300 to your computer and use it in GitHub Desktop.
require 'concurrent'
class Test
def update(time, value, reason)
puts "time" + time
puts "value" + value
puts "reason" + reason
end
end
puts 'testing . . .'
future = Concurrent::Future.new { 'concurrent thread' }
future.add_observer(Test.new)
future.execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment