有点意思,就是不知道性能和稳定性怎样。看 GitHub 貌似项目开始挺早了。
http://www.sitepoint.com/agent-go-like-concurrency-ruby/
require 'agent'
chan = channel!(Integer)
go! do
#the program should only end
#when this goroutine ends
sleep 10
puts "Hello, world!"
chan << 1
end
puts chan.receive.first