boost::corosio::io_timer

Abstract base for asynchronous timers.

Synopsis

class io_timer
    : public io_object

Description

Provides the common timer interface: wait, cancel, and expiry. Concrete classes like timer add the ability to set expiry times and cancel individual waiters.

Thread Safety

Distinct objects: Safe. Shared objects: Unsafe.

Base Classes

Name

Description

io_object

Base class for platform I/O objects.

Types

Name

Description

handle

RAII wrapper for I/O object implementation lifetime.

implementation

Backend interface for timer wait operations.

io_service

Service interface for I/O object lifecycle management.

Type Aliases

Name

Description

clock_type

The clock type used for time operations.

duration

The duration type for relative expiry times.

time_point

The time point type for absolute expiry times.

Member Functions

Name

Description

cancel

Cancel all pending asynchronous wait operations.

context

Return the execution context.

expiry

Return the timer's expiry time as an absolute time.

wait

Wait for the timer to expire.

Protected Member Functions

Name

Description

io_timer [constructor] [deleted]

Move construct.

operator= [deleted]

Assignment operators

do_cancel [virtual]

Dispatch cancel to the concrete implementation.

get

Return the underlying implementation.

Protected Static Member Functions

Name

Description

create_handle

Create a handle bound to a service found in the context.

Protected Data Members

Name

Description

h_

The platform I/O handle owned by this object.

Derived Classes

Name

Description

timer

An asynchronous timer for coroutine I/O.

See Also

timer, io_object

Created with MrDocs