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

#initializeSynchronousMessage

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.



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

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

Instance Method Details

#completedObject

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.



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

def completed
  @reply.release
end

#wait_for_completionObject

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.



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

def wait_for_completion
  @reply.acquire
end