Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] Dispatch question
From: Igor R (boost.lists_at_[hidden])
Date: 2010-07-30 02:50:24


> Attached is a piece of sample code in which I'm trying to use
> Boost.Asio to dispatch a call that will cause the program to shutdown,
> however for some reason the io_service is not ever calling the
> handle_stop method, so the program does not shutdown.

> bool run = m_io.poll_one() >= 0;

the return value of poll_one() is always >=0 (it's size_t), so run is
always true and the condition if(!run && m_stop) is always false.


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