From 3f77dcec4399617febcb44f1160ac2049a5e656f Mon Sep 17 00:00:00 2001 From: Eliot Horowitz Date: Sun, 1 Aug 2010 23:17:07 -0400 Subject: [PATCH] fix yield --- db/clientcursor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/clientcursor.h b/db/clientcursor.h index 52bca44f745..ed9354ec373 100644 --- a/db/clientcursor.h +++ b/db/clientcursor.h @@ -203,6 +203,7 @@ namespace mongo { : _canYield(cc->c->supportYields()) { if ( _canYield ){ cc->prepareToYield( _data ); + _unlock.reset(new dbtempreleasecond()); } } ~YieldLock(){ @@ -222,8 +223,7 @@ namespace mongo { } void relock(){ - if ( _canYield ) - _unlock.reset(); + _unlock.reset(); } private: