Class: LaunchDarkly::SynchronousMessage Private

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

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Direct Known Subclasses

StopMessage, TestSyncMessage

Instance Method Summary collapse

Constructor Details

#initialize ⇒ SynchronousMessage

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of SynchronousMessage.



108
109
110
# File 'lib/ldclient-rb/events.rb', line 108

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

Instance Method Details

#completed ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



112
113
114
# File 'lib/ldclient-rb/events.rb', line 112

def completed
  @reply.release
end

#wait_for_completion ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



116
117
118
# File 'lib/ldclient-rb/events.rb', line 116

def wait_for_completion
  @reply.acquire
end