20#include <boost/scoped_ptr.hpp>
21#include <boost/utility.hpp>
25#include "mongo/base/status.h"
55 virtual std::string name()
const = 0;
67 virtual void run() = 0;
106 bool wait(
unsigned msTimeOut = 0 );
111 State getState()
const;
112 bool running()
const;
115 const bool _selfDelete;
118 const boost::scoped_ptr<JobStatus> _status;
Background thread dispatching.
Definition background.h:45
Status cancel()
If the job has not yet started, transitions the job to the 'done' state immediately,...
bool wait(unsigned msTimeOut=0)
wait for completion.
BackgroundJob(bool selfDelete=false)
sub-class must instantiate the BackgroundJob
virtual void run()=0
define this to do your work.
the main MongoDB namespace
Definition bulk_operation_builder.h:24
MONGO_CLIENT_API Status(MONGO_CLIENT_FUNC *saslClientAuthenticate)(DBClientWithCommands *client
Attempts to authenticate "client" using the SASL protocol.