Class: Protocol::HTTP::Executor::Generic
- Inherits:
-
Middleware
- Object
- Middleware
- Protocol::HTTP::Executor::Generic
- Defined in:
- lib/protocol/http/executor/generic.rb
Overview
The common middleware implementation for isolated execution contexts.
Instance Method Summary collapse
-
#call(request) ⇒ Object
Execute a request using a new isolated execution context.
Instance Method Details
#call(request) ⇒ Object
Execute a request using a new isolated execution context.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/protocol/http/executor/generic.rb', line 18 def call(request) parent = ::Async::Task.current endpoint, worker_streams = Transport.pair backend = spawn(worker_streams) Execution.new(endpoint, backend, request, parent).call rescue endpoint&.close raise end |