Class: Pixo::Rpc::Request
- Inherits:
-
Object
- Object
- Pixo::Rpc::Request
- Defined in:
- lib/pixo/rpc/service.rb
Instance Attribute Summary collapse
-
#latch ⇒ Object
readonly
Returns the value of attribute latch.
-
#message ⇒ Object
Returns the value of attribute message.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(data, async) ⇒ Request
constructor
A new instance of Request.
- #send_result(result) ⇒ Object
Constructor Details
#initialize(data, async) ⇒ Request
Returns a new instance of Request.
86 87 88 89 90 |
# File 'lib/pixo/rpc/service.rb', line 86 def initialize(data, async) @message = Pixo::Rpc::RequestMessage.new(data, async) @latch = Concurrent::CountDownLatch.new(1) unless async end |
Instance Attribute Details
#latch ⇒ Object (readonly)
Returns the value of attribute latch.
84 85 86 |
# File 'lib/pixo/rpc/service.rb', line 84 def latch @latch end |
#message ⇒ Object
Returns the value of attribute message.
81 82 83 |
# File 'lib/pixo/rpc/service.rb', line 81 def @message end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
83 84 85 |
# File 'lib/pixo/rpc/service.rb', line 83 def response @response end |
Instance Method Details
#send_result(result) ⇒ Object
92 93 94 95 |
# File 'lib/pixo/rpc/service.rb', line 92 def send_result(result) @response = result @latch.count_down end |