Class: ActiveVlc::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/activevlc/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(pipeline, *args) ⇒ Runner

Returns a new instance of Runner.



9
10
11
12
# File 'lib/activevlc/runner.rb', line 9

def initialize(pipeline, *args)
  @pipeline = pipeline
  @args = args
end

Instance Method Details

#run(fork = false) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/activevlc/runner.rb', line 19

def run(fork = false)
  if fork and Process.respond_to? :fork
    pid = Process.fork { _run }
    Process.wait pid
  else
    _run
  end
end

#stop_runner!Object

Nobody can escape his faith.



15
16
17
# File 'lib/activevlc/runner.rb', line 15

def stop_runner!
  @running = false
end