Sha256: a9667119b433b801d1c366a84fdece2d3bdff2ba38d16eb58a671588e1b35eca
Contents?: true
Size: 538 Bytes
Versions: 3
Compression:
Stored size: 538 Bytes
Contents
$:.unshift("../lib") require 'ara' class MySimpleActor < SimpleActor def receive( message ) puts "Actor #{self} receive message : #{message}" end end my_actor = Actors.actor_of(MySimpleActor).start sched_one = Scheduler.schedule(my_actor, "Hello World! (every 1 second)", 1, 1, Scheduler::SECOND) sched_two = Scheduler.schedule_once(my_actor, "Hello World! (once after 4 second)", 4, Scheduler::SECOND) sleep 10 sched_one.shutdown puts "-- Scheduler has been shutdown! We wait 5 second to be sure ;)" sleep 5 my_actor.stop
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ara-0.0.3 | examples/simple_scheduler.rb |
ara-0.0.2 | examples/simple_scheduler.rb |
ara-0.0.1 | examples/simple_scheduler.rb |