AWS IoT Device SDK C++ v2 1.45.1
AWS IoT Device SDK C++ v2
Loading...
Searching...
No Matches
Aws::Crt::Io::EventLoop Class Referencefinal

#include <EventLoopGroup.h>

Public Member Functions

 operator bool () const noexcept
ScheduledTask Schedule (std::function< void(TaskStatus)> &&task, std::chrono::nanoseconds run_in) noexcept

Friends

class ClientBootstrap

Detailed Description

A non-owning view of a single event-loop belonging to an EventLoopGroup, on which tasks may be scheduled to run after a delay. Obtain one from EventLoopGroup or ClientBootstrap; the referenced loop is owned by the EventLoopGroup and must outlive any scheduled work.

Member Function Documentation

◆ operator bool()

Aws::Crt::Io::EventLoop::operator bool ( ) const
inlineexplicitnoexcept
Returns
true if this view refers to a valid event loop.

◆ Schedule()

ScheduledTask Aws::Crt::Io::EventLoop::Schedule ( std::function< void(TaskStatus)> && task,
std::chrono::nanoseconds run_in )
noexcept

Runs the task on this event loop once run_in has passed, and returns a handle you can use to cancel it before then. If you cancel it, or the loop shuts down before run_in, the task fires early with TaskStatus::Canceled instead of RunReady.

◆ ClientBootstrap

friend class ClientBootstrap
friend

The documentation for this class was generated from the following files: