summaryrefslogtreecommitdiff
path: root/s/d_writeback.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-05-17 11:58:56 -0400
committerEliot Horowitz <eliot@10gen.com>2011-05-17 14:23:18 -0400
commitfc2f62330f9966400bad5a02de9e8807aa3898e5 (patch)
tree841f6f190217b9b1ff49139df98b3728f62914db /s/d_writeback.h
parent7e36a565869a057196d36da6f30c6a30d92c38d9 (diff)
downloadmongo-fc2f62330f9966400bad5a02de9e8807aa3898e5.tar.gz
convert WriteBack cleaner to periodic task
Diffstat (limited to 's/d_writeback.h')
-rw-r--r--s/d_writeback.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/s/d_writeback.h b/s/d_writeback.h
index e61631875e5..0041339e3df 100644
--- a/s/d_writeback.h
+++ b/s/d_writeback.h
@@ -85,28 +85,16 @@ namespace mongo {
*/
bool cleanupOldQueues();
- /**
- * starts background cleaner thread
- */
- void startCleaner();
private:
// '_writebackQueueLock' protects only the map itself, since each queue is syncrhonized.
mutable mongo::mutex _writebackQueueLock;
WriteBackQueuesMap _writebackQueues;
- /**
- * this background job cleans out writeback queues that have been dead
- * for a long time
- */
- class Cleaner : public BackgroundJob {
+ class Cleaner : public PeriodicTask {
public:
- Cleaner(){}
- virtual ~Cleaner(){}
-
virtual string name() const { return "WriteBackManager::cleaner"; }
-
- virtual void run();
+ virtual void doWork();
};
Cleaner _cleaner;