summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-06-08 13:43:01 -0400
committerEliot Horowitz <eliot@10gen.com>2010-06-08 13:43:01 -0400
commitbe489c67050c196dbfbd1136457d3cb6311035f0 (patch)
tree7f3a05a3f3fec726596ceab34be856a15fb171af
parentecae23c29f4bebd030bbf1e65ecbf2b5c57be108 (diff)
downloadmongo-be489c67050c196dbfbd1136457d3cb6311035f0.tar.gz
try to fix old boost again
-rw-r--r--db/concurrency.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/db/concurrency.h b/db/concurrency.h
index c6444bc6c95..e841d615964 100644
--- a/db/concurrency.h
+++ b/db/concurrency.h
@@ -147,7 +147,10 @@ namespace mongo {
return true;
curopWaitingForLock( 1 );
- bool got = _m.try_lock();
+
+ boost::system_time until = get_system_time();
+ until += boost::posix_time::milliseconds(0);
+ bool got = _m.timed_lock( until );
curopGotLock();
if ( got ){
@@ -262,13 +265,8 @@ namespace mongo {
}
bool lock_try(){
- boost::system_time until = get_system_time();
- until += boost::posix_time::milliseconds(0);
- if( m.timed_lock( until ) ) {
- _minfo.entered();
- return true;
- }
- return false;
+ lock();
+ return true;
}
void releaseEarly() {