3 Jun
2009
3 Jun
'09
1:42 p.m.
void io_worker_thread(void) { #if (WIN32) CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); #endif
io_service.run();
#if (WIN32) CoUninitialize(); #endif };
EXTERN_C EUROATLIB_API TETRAMotoHndl CALL GetTETRAMotoObj() { .... // run the IO service as a separate thread
//io_service_thread.reset( // new boost::thread( // boost::bind(&boost::asio::io_service::run, &io_service) // ) //);
io_service_thread.reset(new boost::thread(io_worker_thread));
... };
You forgot you to pass the io_service to the io_worker_thread.