class Gameworks::Servlet::MatchMaker::Promise
Public Class Methods
new()
click to toggle source
# File lib/gameworks/servlet/match_maker.rb, line 7 def initialize @em_queue = EventMachine::Queue.new end
Public Instance Methods
demand() { |value| ... }
click to toggle source
# File lib/gameworks/servlet/match_maker.rb, line 11 def demand @em_queue.pop{ |value| yield value } end
fulfill(value)
click to toggle source
# File lib/gameworks/servlet/match_maker.rb, line 15 def fulfill(value) @em_queue.push(value) end