Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] Where to use CoInitizeEx
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-06-03 09:53:54


Igor R ha scritto:

>>
>> 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.

The io_service object is declared as static in the module:

// Main io_service
static boost::asio::io_service io_service;

Daniele.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net