13.07.2015 Views

Multithreading - Poco

Multithreading - Poco

Multithreading - Poco

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

#include "<strong>Poco</strong>/ActiveMethod.h"#include "<strong>Poco</strong>/ActiveResult.h"#include "<strong>Poco</strong>/ActiveDispatcher.h"#include using <strong>Poco</strong>::ActiveMethod;using <strong>Poco</strong>::ActiveResult;class ActiveAdder: public <strong>Poco</strong>::ActiveDispatcher{public:ActiveObject(): add(this, &ActiveAdder::addImpl){}ActiveMethod add;private:int addImpl(const std::pair& args){return args.first + args.second;}};

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!