Opened 9 years ago

#9326 new Feature Requests

io_service.get_unfinished_work_count()

Reported by: edubart <edub4rt@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost Development Trunk Severity: Cosmetic
Keywords: Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.