normandy/examples/channels.rb
2015-08-03 13:50:05 +02:00

10 lines
138 B
Ruby

# https://gobyexample.com/channels
require 'channel'
messages = Channel.new
go -> { messages << 'ping' }
msg = messages.recv
puts msg