11 Apr
2013
11 Apr
'13
9:22 a.m.
<...>
{ boost::asio::io_service io_service; boost::asio::dir_monitor dm(io_service);
dm.add_directory("C:\\Users\\SRD\\DirA");
boost::asio::dir_monitor_event ev = dm.monitor(); dm.async_monitor(create_file_handler);
t = boost::thread(boost::bind(&boost::asio::io_service::run, boost::refio_service))); boost::system_time time = boost::get_system_time(); time += boost::posix_time::time_duration(0, 0, 1); boost::thread::sleep(time); }
Note that at this point io_service and dm get destroyed.