summaryrefslogtreecommitdiff
path: root/db/clientcursor.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-08-01 23:17:07 -0400
committerEliot Horowitz <eliot@10gen.com>2010-08-01 23:17:07 -0400
commit3f77dcec4399617febcb44f1160ac2049a5e656f (patch)
treedd38312a5768388131eed88b318337f0c25ab114 /db/clientcursor.h
parentcd0cd9912db7a0945a316f04e31e221be5c0d3ea (diff)
downloadmongo-3f77dcec4399617febcb44f1160ac2049a5e656f.tar.gz
fix yield
Diffstat (limited to 'db/clientcursor.h')
-rw-r--r--db/clientcursor.h4
1 files 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: