summaryrefslogtreecommitdiff
path: root/src/mongo/db/d_concurrency.h
diff options
context:
space:
mode:
authorDwight <dwight@10gen.com>2012-03-18 15:43:05 -0400
committerDwight <dwight@10gen.com>2012-03-18 15:43:05 -0400
commit3caf10e15c9ffb9582cd1eaa386fae5c33ba12fa (patch)
treeb114959266bca1e049851d9f8a7fa8a1ec209d3a /src/mongo/db/d_concurrency.h
parentf2c3587ef3a31d54183be6e62c23f1e89c748065 (diff)
downloadmongo-3caf10e15c9ffb9582cd1eaa386fae5c33ba12fa.tar.gz
SERVER-4328 cleaning of d_concurrency for readability. removed the 't' state for temprelease. that was making the code complicated it wasn't work it.
we can track that in LockState if we like, which would be good for assertion puproses, but this is better than the way it was.
Diffstat (limited to 'src/mongo/db/d_concurrency.h')
-rw-r--r--src/mongo/db/d_concurrency.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/d_concurrency.h b/src/mongo/db/d_concurrency.h
index d2cd75563c3..d26211a961b 100644
--- a/src/mongo/db/d_concurrency.h
+++ b/src/mongo/db/d_concurrency.h
@@ -32,9 +32,12 @@ namespace mongo {
int local;
};
class GlobalWrite : boost::noncopyable { // recursive is ok
- const bool stopGreed;
- const char old;
+ const bool stoppedGreed;
public:
+ /** @param stopGreed after acquisition stop greediness of other threads for write locks. this should generally not
+ be used it is for exceptional circumstances. journaling uses it. perhaps this should go away,
+ it makes the software more complicated.
+ */
GlobalWrite(bool stopGreed = false);
~GlobalWrite();
void downgrade(); // W -> R