Boost logo

Boost Users :

From: Jonathan Biggar (jon_at_[hidden])
Date: 2008-08-29 20:01:15


lakers fan wrote:
> Hello,
> I have a udp listener socket, I want that to run in a separate
> thread. Just listen for incoming messages and pass the message to
> message handler. I checked the tutorial, it shows
>
> boost::asio::io_service io_service;
> udp_server server(io_service);
> io_service.run();
>
> I see the run() method running in a loop. Then how do I stop the service
> from some other thread?.
>
> Any help would be greatly appreciated.

Arrange for a way for another thread can call top() on the first
thread's io_service object.

-- 
Jon Biggar
Floorboard Software
jon_at_[hidden]
jon_at_[hidden]

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