Created
May 27, 2014 09:24
-
-
Save luca3m/aef4edaa95d97e41792b to your computer and use it in GitHub Desktop.
Simple pool with lambda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment