AWS IoT Device SDK C++ v2
1.34.0
AWS IoT Device SDK C++ v2
|
#include <EventLoopGroup.h>
Public Member Functions | |
EventLoopGroup (uint16_t threadCount=0, Allocator *allocator=ApiAllocator()) noexcept | |
EventLoopGroup (uint16_t cpuGroup, uint16_t threadCount, Allocator *allocator=ApiAllocator()) noexcept | |
~EventLoopGroup () | |
EventLoopGroup (const EventLoopGroup &)=delete | |
EventLoopGroup (EventLoopGroup &&) noexcept | |
EventLoopGroup & | operator= (const EventLoopGroup &)=delete |
EventLoopGroup & | operator= (EventLoopGroup &&) noexcept |
operator bool () const | |
int | LastError () const |
A collection of event loops.
An event-loop is a thread for doing async work, such as I/O. Classes that need to do async work will ask the EventLoopGroup for an event-loop to use.
The number of threads used depends on your use-case. IF you have a maximum of less than a few hundred connections 1 thread is the ideal threadCount.
There should only be one instance of an EventLoopGroup per application and it should be passed to all network clients. One exception to this is if you want to peg different types of IO to different threads. In that case, you may want to have one event loop group dedicated to one IO activity and another dedicated to another type.
|
noexcept |
threadCount | The number of event-loops to create, default will be 0, which will create one for each processor on the machine. |
allocator | memory allocator to use. |
|
noexcept |
cpuGroup | The CPU group (e.g. NUMA nodes) that all hardware threads are pinned to. |
threadCount | The number of event-loops to create, default will be 0, which will create one for each processor on the machine. |
allocator | memory allocator to use. |
Aws::Crt::Io::EventLoopGroup::~EventLoopGroup | ( | ) |
|
delete |
|
noexcept |
int Aws::Crt::Io::EventLoopGroup::LastError | ( | ) | const |
Aws::Crt::Io::EventLoopGroup::operator bool | ( | ) | const |
|
delete |
|
noexcept |