Skip to content

Instantly share code, notes, and snippets.

@luca3m
Created May 27, 2014 09:24
Show Gist options
  • Save luca3m/aef4edaa95d97e41792b to your computer and use it in GitHub Desktop.
Save luca3m/aef4edaa95d97e41792b to your computer and use it in GitHub Desktop.

Revisions

  1. luca3m created this gist May 27, 2014.
    7 changes: 7 additions & 0 deletions simple_pool.cpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    simple_pool::ptr_t pool = simple_pool::create();

    // Calls block with a valid connection, retrying if something fails
    pool->run_with_connection<void>([&](connection::ptr_t conn)
    {
    conn->run(command("SET")("foo")("bar"));
    });