Sha256: 4fb28c6a2c1a761d04a20c5a4e85f7a9367aff0261232caeae4f45a59e9e4b2f
Contents?: true
Size: 457 Bytes
Versions: 2
Compression:
Stored size: 457 Bytes
Contents
$:.unshift("../lib") require 'ara' class MySimpleActor < SimpleActor def receive( message ) puts "Actor #{self} receive message : #{message}" end end mySimpleActor = Actors.actor_of(MySimpleActor).start mySimpleActor | "Bonjour le monde!" sleep 1 mySimpleActor | "Hello World!" mySimpleActor | "Ola Mundo!" sleep 1 mySimpleActor.stop sleep 1 # This will raise an exception begin mySimpleActor | "Hum..." rescue DeadActor => e puts e end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ara-0.0.2 | examples/simple_actor.rb |
ara-0.0.1 | examples/simple_actor.rb |