Class: Faraday::Adapter::EMSynchrony::ParallelManager

### Home Classes Methods

### In Files

- lib/faraday/adapter/em_synchrony/parallel_manager.rb

### Parent

Object

### Methods

- #add
- #run

### Class/Module Index

Quicksearch

- Faraday
- Faraday::Adapter
- Faraday::Adapter::EMHttp
- Faraday::Adapter::EMHttp::Manager
- Faraday::Adapter::EMHttp::Options
- Faraday::Adapter::EMSynchrony
- Faraday::Adapter::EMSynchrony::ParallelManager
- Faraday::Adapter::Excon
- Faraday::Adapter::HTTPClient
- Faraday::Adapter::NetHttp
- Faraday::Adapter::NetHttpPersistent
- Faraday::Adapter::Parallelism
- Faraday::Adapter::Patron
- Faraday::Adapter::Rack
- Faraday::Adapter::Test
- Faraday::Adapter::Test::Stub
- Faraday::Adapter::Test::Stubs
- Faraday::Adapter::Test::Stubs::NotFound
- Faraday::Adapter::Typhoeus
- Faraday::AutoloadHelper
- Faraday::ClientError
- Faraday::CompositeReadIO
- Faraday::Connection
- Faraday::ConnectionFailed
- Faraday::ConnectionOptions
- Faraday::Env
- Faraday::Error
- Faraday::FlatParamsEncoder
- Faraday::Middleware
- Faraday::MiddlewareRegistry
- Faraday::MissingDependency
- Faraday::NestedParamsEncoder
- Faraday::Options
- Faraday::ParsingError
- Faraday::ProxyOptions
- Faraday::RackBuilder
- Faraday::RackBuilder::Handler
- Faraday::RackBuilder::StackLocked
- Faraday::Request
- Faraday::Request::Authorization
- Faraday::Request::BasicAuthentication
- Faraday::Request::Instrumentation
- Faraday::Request::Instrumentation::Options
- Faraday::Request::Multipart
- Faraday::Request::Retry
- Faraday::Request::Retry::Options
- Faraday::Request::TokenAuthentication
- Faraday::Request::UrlEncoded
- Faraday::RequestOptions
- Faraday::ResourceNotFound
- Faraday::Response
- Faraday::Response::Logger
- Faraday::Response::Middleware
- Faraday::Response::RaiseError
- Faraday::SSLError
- Faraday::SSLOptions
- Faraday::TimeoutError
- Faraday::Utils
- Faraday::Utils::Headers
- Faraday::Utils::ParamsHash
- EmHttpSslPatch
- Object

No matching classes.

# Faraday::Adapter::EMSynchrony::ParallelManager

### Public Instance Methods

add(request, method, *args, &block) click to toggle source

Add requests to queue. The `request` argument should be a `EM::HttpRequest` object.

    # File lib/faraday/adapter/em_synchrony/parallel_manager.rb, line 8
    def add(request, method, *args, &block)
      queue << {
        :request => request,
        :method => method,
        :args => args,
        :block => block
      }
    end

run() click to toggle source

Run all requests on queue with `EM::Synchrony::Multi`, wrapping it in a reactor and fiber if needed.

    # File lib/faraday/adapter/em_synchrony/parallel_manager.rb, line 19
    def run
      result = nil
      if !EM.reactor_running?
        EM.run {
          Fiber.new do
            result = perform
            EM.stop
          end.resume
        }
      else
        result = perform
      end
      result
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.