Only in mongo-cxx-driver-v1.6-fixed/: CMakeLists.txt
diff -ru mongo-cxx-driver-v1.6/mongo/util/background.cpp mongo-cxx-driver-v1.6-fixed/mongo/util/background.cpp
--- mongo-cxx-driver-v1.6/mongo/util/background.cpp	2010-08-16 23:41:46.000000000 -0700
+++ mongo-cxx-driver-v1.6-fixed/mongo/util/background.cpp	2010-09-16 12:17:43.738970111 -0700
@@ -22,24 +22,16 @@
 
 namespace mongo {
 
-    BackgroundJob *BackgroundJob::grab = 0;
-    mongo::mutex BackgroundJob::mutex("BackgroundJob");
-
-    /* static */
     void BackgroundJob::thr() {
-        assert( grab );
-        BackgroundJob *us = grab;
-        assert( us->state == NotStarted );
-        us->state = Running;
-        grab = 0;
-
         {
-            string nm = us->name();
-            setThreadName(nm.c_str());
+          boost::unique_lock<boost::mutex> lk(_m);
+          assert( state == NotStarted );
+          state = Running;
+          setThreadName(name().c_str());
         }
 
         try {
-            us->run();
+            run();
         }
         catch ( std::exception& e ){
             log( LL_ERROR ) << "backgroundjob error: " << e.what() << endl;
@@ -47,31 +39,33 @@
         catch(...) {
             log( LL_ERROR ) << "uncaught exception in BackgroundJob" << endl;
         }
-        us->state = Done;
-        bool delSelf = us->deleteSelf;
-        us->ending();
-        if( delSelf ) 
-            delete us;
+        {
+          boost::unique_lock<boost::mutex> lk(_m);
+          state = Done;
+          ending();
+        }
+        _c.notify_one();
+        bool delSelf = deleteSelf;
+        if( delSelf )
+            delete this;
     }
 
     BackgroundJob& BackgroundJob::go() {
-        scoped_lock bl(mutex);
-        assert( grab == 0 );
-        grab = this;
-        boost::thread t(thr);
-        while ( grab )
-            sleepmillis(2);
+        boost::thread t( boost::bind(&BackgroundJob::thr, this) );
         return *this;
     }
 
-    bool BackgroundJob::wait(int msMax, unsigned maxsleep) {
-        unsigned ms = 1;
-        Date_t start = jsTime();
+    bool BackgroundJob::wait(int msMax) {
+        boost::unique_lock<boost::mutex> lk(_m);
         while ( state != Done ) {
-            sleepmillis(ms);
-            if( ms*2<maxsleep ) ms*=2;
-            if ( msMax && ( int( jsTime() - start ) > msMax) )
+            if (msMax) {
+              if (!_c.timed_wait(lk,
+                  boost::get_system_time() + boost::posix_time::milliseconds(msMax))) {
                 return false;
+              }
+            } else {
+              _c.wait(lk);
+            }
         }
         return true;
     }
@@ -82,17 +76,9 @@
     }
 
     /* wait for several jobs to finish. */
-    void BackgroundJob::wait(list<BackgroundJob*>& L, unsigned maxsleep) {
-        unsigned ms = 1;
-        {
-            x:
-            sleepmillis(ms);
-            if( ms*2<maxsleep ) ms*=2;
-            for( list<BackgroundJob*>::iterator i = L.begin(); i != L.end(); i++ ) { 
-                assert( (*i)->state != NotStarted );
-                if( (*i)->state != Done )
-                    goto x;
-            }
+    void BackgroundJob::wait(const list<BackgroundJob*>& L) {
+        for( list<BackgroundJob*>::const_iterator i = L.begin(); i != L.end(); i++ ) {
+          (*i)->wait();
         }
     }
     
diff -ru mongo-cxx-driver-v1.6/mongo/util/background.h mongo-cxx-driver-v1.6-fixed/mongo/util/background.h
--- mongo-cxx-driver-v1.6/mongo/util/background.h	2010-08-04 09:08:38.000000000 -0700
+++ mongo-cxx-driver-v1.6-fixed/mongo/util/background.h	2010-09-16 12:14:05.289012106 -0700
@@ -72,23 +72,23 @@
         // starts job.  returns once it is "dispatched"
         BackgroundJob& go();
 
-        // wait for completion.  this spins with sleep() so not terribly efficient.
+        // wait for completion.
         // returns true if did not time out.
         //
         // note you can call wait() more than once if the first call times out.
-        bool wait(int msMax = 0, unsigned maxSleepInterval=1000);
+        bool wait(int msMax = 0);
 
         /* start several */
         static void go(list<BackgroundJob*>&);
 
         /* wait for several jobs to finish. */
-        static void wait(list<BackgroundJob*>&, unsigned maxSleepInterval=1000);
+        static void wait(const list<BackgroundJob*>&);
 
     private:
-        static BackgroundJob *grab;
-        static mongo::mutex mutex;
-        static void thr();
+        void thr();
         volatile State state;
+        boost::mutex _m;
+        boost::condition _c;
     };
 
     class PeriodicBackgroundJob : public BackgroundJob {
