Class: Pixo::Rpc::ApplicationService
- Defined in:
- lib/pixo/rpc/application_service.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
readonly
Returns the value of attribute application.
Instance Method Summary collapse
-
#initialize(reader_pipe, writer_pipe, app, latch) ⇒ ApplicationService
constructor
A new instance of ApplicationService.
- #thread_run ⇒ Object
Methods inherited from Service
#live_request_count, #request, #run, #shutdown
Constructor Details
#initialize(reader_pipe, writer_pipe, app, latch) ⇒ ApplicationService
Returns a new instance of ApplicationService.
5 6 7 8 9 10 11 |
# File 'lib/pixo/rpc/application_service.rb', line 5 def initialize(reader_pipe, writer_pipe, app, latch) super(reader_pipe, writer_pipe) @application = app @latch = latch @service_thread = Thread.new { self.thread_run } end |
Instance Attribute Details
#application ⇒ Object (readonly)
Returns the value of attribute application.
3 4 5 |
# File 'lib/pixo/rpc/application_service.rb', line 3 def application @application end |
Instance Method Details
#thread_run ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/pixo/rpc/application_service.rb', line 13 def thread_run @latch.wait(10) run rescue STDERR.puts $!.inspect ensure application.shutdown end |