Sha256: a2f67c15767f91e982ff97143f6996148a39321803bf87543d49812ff79533ed

Contents?: true

Size: 343 Bytes

Versions: 121

Compression:

Stored size: 343 Bytes

Contents

require "#{File.dirname(__FILE__)}/../dataflow"
include Dataflow

Ping = Actor.new {
  3.times {
    case receive
    when "Ping"
      puts "Ping"
      Pong.send "Pong"
    end
  }
}

Pong = Actor.new {
  3.times {
    case receive
    when "Pong"
      puts "Pong"
      Ping.send "Ping"
    end
  }
}

Ping.send "Ping"
Ping.join
Pong.join

Version data entries

121 entries across 121 versions & 3 rubygems

Version Path
dataflow-0.1.0 examples/messages.rb