Support for pipelining #10

Merged
merged 18 commits into from Mar 11, 2012
Commits on Mar 2, 2012
  1. @arc
Commits on Mar 7, 2012
  1. @arc
  2. @arc
  3. @arc
  4. @arc
  5. @arc

    Document scalar-context KEYS return

    arc committed Mar 5, 2012
    It's tested for in t/01-basic.t, so I assume it's deliberate.
  6. @arc

    Rename __try_reconnect to __throw_reconnect

    arc committed Mar 5, 2012
    Since it never tries to do anything, but always throws an exception, the new
    name is more descriptive of what it does.
  7. @arc
  8. @arc

    Remove final argument in __read_response, __read_response_r

    arc committed Mar 6, 2012
    There are no remaining callers that use it.
  9. @arc
  10. @arc

    Pipelining support

    arc committed Mar 7, 2012
    Most command methods now take an optional trailing coderef; if a coderef is
    supplied, we don't wait for the command's response, but merely schedule the
    coderef to be called once the response has been read.
Commits on Mar 8, 2012
  1. @arc

    Refactor __run_cmd as __queue_cmd

    arc committed Mar 8, 2012
    - Takes an additional argument indicating whether nested errors should be
      collected (so callers don't have to manually fix up the relevant data
      structure)
    
    - Renamed to better reflect its purpose
  2. @arc

    Add tests for pipelined INFO and KEYS

    arc committed Mar 8, 2012
    Since they're the two pipeline-capable commands that have unusual return
    values, it seems particularly valuable to test them.
  3. @arc

    Factor out new __run_cmd method

    arc committed Mar 8, 2012
    Unlike the previous method of the same name, this one actually sends a
    request and enqueues a response handler.
  4. @arc
  5. @arc
  6. @arc

    Performance enhancement in non-reconnect mode

    arc committed Mar 8, 2012
    If we aren't in reconnect mode, using __with_reconnect adds a method call
    and a closure invocation to every request, no matter how trivial.  This
    change adds a fast path for directly calling __run_cmd in the three relevant
    locations.  In my tests, this saves up to a third of the best-case amortised
    per-request execution time.
  7. @arc

    Documentation for pipelining

    arc committed Mar 8, 2012