Class: LaunchDarkly::SynchronousMessage Private
- Inherits:
-
Object
- Object
- LaunchDarkly::SynchronousMessage
- 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
Instance Method Summary collapse
- #completed ⇒ Object private
-
#initialize ⇒ SynchronousMessage
constructor
private
A new instance of SynchronousMessage.
- #wait_for_completion ⇒ Object private
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.
107 108 109 |
# File 'lib/ldclient-rb/events.rb', line 107 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.
111 112 113 |
# File 'lib/ldclient-rb/events.rb', line 111 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.
115 116 117 |
# File 'lib/ldclient-rb/events.rb', line 115 def wait_for_completion @reply.acquire end |