From 6f640ed967635fd91f59b6df61f739d008124bdb Mon Sep 17 00:00:00 2001 From: Michal Bukovsky Date: Tue, 3 May 2016 16:50:03 +0200 Subject: [PATCH 1/2] don't create connection under lock --- include/mcache/io/connections.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/include/mcache/io/connections.h b/include/mcache/io/connections.h index 74a11dd..3e7906c 100644 --- a/include/mcache/io/connections.h +++ b/include/mcache/io/connections.h @@ -221,12 +221,15 @@ class caching_connection_pool_t { * soon as he stops using it. */ connection_ptr_t pick() { - boost::mutex::scoped_lock guard(mutex); - if (stack.empty()) - return boost::make_shared(addr, opts); - connection_ptr_t tmp = stack.top(); - stack.pop(); - return tmp; + { + boost::mutex::scoped_lock guard(mutex); + if (!stack.empty()) { + connection_ptr_t tmp = stack.top(); + stack.pop(); + return tmp; + } + } + return boost::make_shared(addr, opts); } /** Push connection back to pool. From 1cfcb2a062f4935c62eda4f92f541f1e9a734299 Mon Sep 17 00:00:00 2001 From: Michal Bukovsky Date: Tue, 3 May 2016 16:54:30 +0200 Subject: [PATCH 2/2] #! v0.2.14 --- configure.ac | 2 +- debian/changelog | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index ef207e5..206d6fb 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,7 @@ # # initialize autoconf -AC_INIT([libmcache], [0.2.13], [michal.bukovsky@firma.seznam.cz]) +AC_INIT([libmcache], [0.2.14], [michal.bukovsky@firma.seznam.cz]) VERSION_INFO="-version-info 0:0:0" # Enable silent builds (disable with --disable-silent-rules) diff --git a/debian/changelog b/debian/changelog index c4be74d..aaeedaa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +szn-libmcache (0.2.14) stable; urgency=low + + * don't create connection under lock + * doc + * doc + * Change doxygen documentation build a bit. + * travis + * travis + * travis + * travis + * travis + * travis + * travis.yml + * doc + * doc + * atomic_update only for c++11 + * add zlib1g-dev + + -- Michal Bukovsky Tue, 03 May 2016 16:54:17 +0100 + szn-libmcache (0.2.13) unstable; urgency=low * fix references