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
engineyard-serverside-2.0.4 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.5 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.3 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.2 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.1 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0.rc1 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0.pre5 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0.pre4 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0.pre3 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0.pre2 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-2.0.0.pre1 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.7.0.pre2 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4.pre6 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4.pre5 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4.pre4 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4.pre3 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4.pre2 lib/vendor/dataflow/examples/messages.rb
engineyard-serverside-1.6.4.pre lib/vendor/dataflow/examples/messages.rb