Subject: [Boost-bugs] [Boost C++ Libraries] #9326: io_service.get_unfinished_work_count()
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-30 18:52:47
#9326: io_service.get_unfinished_work_count()
-------------------------------------+----------------------------
Reporter: edubart <edub4rt@â¦> | Owner: chris_kohlhoff
Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost Development Trunk | Severity: Cosmetic
Keywords: |
-------------------------------------+----------------------------
Would be good to have this function to return how many work the io_service
still have left to do. By diving in the sources, I found out that this
function would be simples as:
{{{
long get_unfinished_work_count() { return outstanding_work_; }
}}}
This function is useful to know if asio still have unfinished work to do.
Meantime the only way to know if there is still work left to do, is by
calling run_one()/run() and see if it returns immediately or not, that
approach is not ideal. There are cases that you don't want to block the
thread.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9326> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC