class Roma::AsyncMessage

Attributes

args[RW]
callback[RW]
event[RW]

Public Class Methods

new(ev, ag = nil, &cb) click to toggle source
   # File lib/roma/async_process.rb
11 def initialize(ev, ag = nil, &cb)
12   @event = ev
13   @args = ag
14   @callback = cb
15   @retry_count = 0
16   @retry_max = 10
17   @retry_wait = 0.1
18 end

Public Instance Methods

incr_count() click to toggle source
   # File lib/roma/async_process.rb
24 def incr_count
25   @retry_count += 1
26 end
retry?() click to toggle source
   # File lib/roma/async_process.rb
20 def retry?
21   @retry_max > @retry_count
22 end
wait() click to toggle source
   # File lib/roma/async_process.rb
28 def wait
29   sleep(@retry_wait)
30 end