Class: LaunchDarkly::SynchronousMessage

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/events.rb

Direct Known Subclasses

StopMessage, TestSyncMessage

Instance Method Summary collapse

Constructor Details

#initializeSynchronousMessage

Returns a new instance of SynchronousMessage.



87
88
89
# File 'lib/ldclient-rb/events.rb', line 87

def initialize
  @reply = Concurrent::Semaphore.new(0)
end

Instance Method Details

#completedObject



91
92
93
# File 'lib/ldclient-rb/events.rb', line 91

def completed
  @reply.release
end

#wait_for_completionObject



95
96
97
# File 'lib/ldclient-rb/events.rb', line 95

def wait_for_completion
  @reply.acquire
end