Class: HTTPkit::Promise

Inherits:
Promise
  • Object
show all
Defined in:
lib/httpkit/promise.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) wait



5
6
7
8
9
10
11
# File 'lib/httpkit/promise.rb', line 5

def wait
  fiber  = Fiber.current
  resume = proc { fiber.resume }
  self.then(resume, resume)

  Fiber.yield
end