Class: Azuma::DRb

Inherits:
Object
  • Object
show all
Defined in:
lib/azuma/drb.rb

Class Method Summary collapse

Class Method Details

.start(talkers) ⇒ Object


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/azuma/drb.rb', line 18

def self.start(talkers)
  roulette = Azuma.entry(talkers)

  @server = ::DRb.start_service(nil, roulette)

  puts "drb starting on #{::DRb.uri}"

  Signal.trap(:INT) do
    puts; puts('Stopping ...')

    @server.stop_service

    puts('Exiting ...'); exit!
  end

  ::DRb.uri
end