Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

io_service::work

Class to inform the io_service when it has work to do.

class work
Member Functions

Name

Description

get_io_service

Get the io_service associated with the work.

work

Constructor notifies the io_service that work is starting.

Copy constructor notifies the io_service that work is starting.

~work

Destructor notifies the io_service that the work is complete.

The work class is used to inform the io_service when work starts and finishes. This ensures that the io_service object's run() function will not exit while work is underway, and that it does exit when there is no unfinished work remaining.

The work class is copy-constructible so that it may be used as a data member in a handler class. It is not assignable.

Requirements

Header: boost/asio/io_service.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext