Class: TPX::Prom

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

Instance Method Summary collapse

Constructor Details

#initialize(exec) ⇒ Prom

Returns a new instance of Prom.



3
4
5
6
7
# File 'lib/tpx.rb', line 3

def initialize(exec)
  @cnt = 0
  @exec = exec
  @q = exec.schedule_m_build
end

Instance Method Details

#add(args, &block) ⇒ Object



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

def add(args, &block)
  @exec.schedule_m_add([@q, @cnt, args], &block)
  @cnt += 1
end

#resolveObject



14
15
16
# File 'lib/tpx.rb', line 14

def resolve
  @exec.schedule_m_read(@q, @cnt)
end