Sha256: 2b019096c57d713590ccf1801ed236d250cbd7dbc97264650d14891b5e0e001f
Contents?: true
Size: 561 Bytes
Versions: 1
Compression:
Stored size: 561 Bytes
Contents
$:.unshift("../lib") require 'ara' # Ara.logger = Logger.new("actor.log") Ara.debug "Starting..." class MySimpleActor < SimpleActor def receive( message ) Ara.info "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 Ara.debug "Ending..." # This will raise an exception begin mySimpleActor | "Hum..." rescue DeadActor => e Ara.fatal e.message end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ara-0.0.3 | examples/logger_actor.rb |