diff options
author | Andy Schwerin <schwerin@10gen.com> | 2012-05-04 11:54:53 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2012-05-09 09:34:13 -0400 |
commit | a0d04bc7edb687ad58eff4ba6c7369190d62ada4 (patch) | |
tree | 976211ccb5ee1d460ef9fa15092ec74862a03acd /src/mongo/db/d_concurrency.cpp | |
parent | ecc718874c226c0670700298f3f3e03ed7f82a62 (diff) | |
download | mongo-a0d04bc7edb687ad58eff4ba6c7369190d62ada4.tar.gz |
Isolate stop/start greed logic in qlock.h
Diffstat (limited to 'src/mongo/db/d_concurrency.cpp')
-rw-r--r-- | src/mongo/db/d_concurrency.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/mongo/db/d_concurrency.cpp b/src/mongo/db/d_concurrency.cpp index 070f45ef211..469cf25b534 100644 --- a/src/mongo/db/d_concurrency.cpp +++ b/src/mongo/db/d_concurrency.cpp @@ -120,8 +120,6 @@ namespace mongo { public: LockStat stats; - void start_greed() { q.start_greed(); } - void lock_r() { verify( threadState() == 0 ); lockState().locked( 'r' ); @@ -452,9 +450,6 @@ namespace mongo { else { q.unlock_W(); } - if( stoppedGreed ) { - q.start_greed(); - } } void Lock::GlobalWrite::downgrade() { verify( !noop ); @@ -466,11 +461,6 @@ namespace mongo { bool Lock::GlobalWrite::upgrade() { verify( !noop ); verify( threadState() == 'R' ); - if( stoppedGreed ) { - // we undo stopgreed here if it were set earlier, as we now want a W lock - stoppedGreed = false; - q.start_greed(); - } if( q.R_to_W() ) { lockState().changeLockState( 'W' ); return true; |