47 #ifndef _MIRA_IOSERVICE_H_ 48 #define _MIRA_IOSERVICE_H_ 51 #include <boost/asio.hpp> 88 IOService(boost::asio::io_service& service);
100 void runThreads(std::size_t threadCount = 0,
bool runInThisThread =
true);
108 return mService.run();
116 return mService.run_one();
138 operator boost::asio::io_service&()
143 template <
typename CompletionHandler>
144 void post(CompletionHandler handler)
146 mService.post(handler);
156 boost::shared_ptr<Pimpl> mPimpl;
158 boost::asio::io_service& mService;
159 typedef boost::shared_ptr<boost::thread> ThreadPtr;
160 std::vector<ThreadPtr> mThreads;
164 typedef boost::shared_ptr<boost::asio::io_service>
ServicePtr;
Definition: SyncTimedRead.h:62
void post(CompletionHandler handler)
Definition: IOService.h:144
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
std::size_t run()
Wrapper for boost::asio::io_service::run() This will block until boost::asio::io_service::run() retur...
Definition: IOService.h:106
void stop()
Wrapper for boost::asio::io_service::stop()
Definition: IOService.h:122
std::size_t runOne()
Wrapper for boost::asio::io_service::run_one()
Definition: IOService.h:114
virtual ~IOService()
The destructor.
Definition: IOService.h:91
boost::shared_ptr< IOService > IOServicePtr
A shared pointer wrapper for class IOService.
Definition: IOService.h:167
Wrapper class for boost::asio::io_service.
Definition: IOService.h:75
boost::shared_ptr< boost::asio::io_service > ServicePtr
A shared pointer wrapper for class boost::asio::io_service.
Definition: IOService.h:164
void reset()
Wrapper for boost::asio::io_service::reset()
Definition: IOService.h:130