mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
fix yield
This commit is contained in:
parent
cd0cd9912d
commit
3f77dcec43
@ -203,6 +203,7 @@ namespace mongo {
|
|||||||
: _canYield(cc->c->supportYields()) {
|
: _canYield(cc->c->supportYields()) {
|
||||||
if ( _canYield ){
|
if ( _canYield ){
|
||||||
cc->prepareToYield( _data );
|
cc->prepareToYield( _data );
|
||||||
|
_unlock.reset(new dbtempreleasecond());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~YieldLock(){
|
~YieldLock(){
|
||||||
@ -222,8 +223,7 @@ namespace mongo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void relock(){
|
void relock(){
|
||||||
if ( _canYield )
|
_unlock.reset();
|
||||||
_unlock.reset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user