$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Inverval timer.
From: Igor R (boost.lists_at_[hidden])
Date: 2009-02-12 15:12:52
>
> If I use run there application hang, it doesn't use CPU and doesn't eat
> memory, just stop responce.
>
io_service::run() blocks until all the work is done. However, you can run
io_service in another thread, like this:
boost::thread thread(boost::bind(&io_service::run, &io_service_)); //note
that io_service_ must outlive the thread
then you can use this io_service with any number of timers/sockets - all
their handlers will run in that thread.