ifuture
An implementation of Futures built on Ruby Fork and IChannel.
Usage
future = IFuture.new do
3.downto 0 do |n|
sleep 1
puts "#{n}..."
end
'Sekret!!'
end
future.ready?
#=> false
sleep 5
#=> 5
# 3...
# 2...
# 1...
# 0...
future.ready?
#=> true
future.value
#=> "Sekret!!"
Installation
gem install ifuture
Contributing
- Fork it
- Commit your changes
- Create a pull request