class Estore::Commands::Promise

Attributes

correlation_id[R]

Public Class Methods

new(correlation_id) click to toggle source
Calls superclass method
# File lib/estore/commands/promise.rb, line 6
def initialize(correlation_id)
  super()
  @correlation_id = correlation_id
end

Public Instance Methods

wait() click to toggle source
# File lib/estore/commands/promise.rb, line 11
def wait
  t = Thread.current
  resume = proc { t.wakeup }
  self.then(resume, resume)
  sleep
end