diff options
author | Randolph Tan <randolph@10gen.com> | 2013-08-20 14:37:13 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2013-08-20 14:50:47 -0400 |
commit | 712619f82fec8290eb1a1ecd1dd0185dfcb92a16 (patch) | |
tree | 57af6e0e88cc59faeafba582559fcb3ce960660e | |
parent | f1f9514ad9840bfd7dea9cf9ee1b6b3ce7563e11 (diff) | |
download | mongo-712619f82fec8290eb1a1ecd1dd0185dfcb92a16.tar.gz |
SERVER-8707 dbclient_rs_test threading issue
Allow BackgroundJob to be restartable.
-rw-r--r-- | src/mongo/util/background.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp index 347f8b1bdd5..b3a15667ffe 100644 --- a/src/mongo/util/background.cpp +++ b/src/mongo/util/background.cpp @@ -54,7 +54,9 @@ namespace mongo { LOG(1) << "BackgroundJob starting: " << name() << endl; { scoped_lock l( status->m ); - massert( 13643 , mongoutils::str::stream() << "backgroundjob already started: " << name() , status->state == NotStarted ); + massert( 13643, mongoutils::str::stream() << "backgroundjob already started: " + << name(), + status->state != Running ); status->state = Running; } |