CIRCT  19.0.0git
Classes | Public Member Functions | Private Attributes | List of all members
esi::AcceleratorServiceThread Class Reference

Background thread which services various requests. More...

#include <Accelerator.h>

Collaboration diagram for esi::AcceleratorServiceThread:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

 AcceleratorServiceThread ()
 
 ~AcceleratorServiceThread ()
 
void addListener (std::initializer_list< ReadChannelPort * > listenPorts, std::function< void(ReadChannelPort *, MessageData)> callback)
 When there's data on any of the listenPorts, call the callback. More...
 
void stop ()
 Instruct the service thread to stop running. More...
 

Private Attributes

std::unique_ptr< Implimpl
 

Detailed Description

Background thread which services various requests.

Currently, it listens on ports and calls callbacks for incoming messages on said ports.

Definition at line 164 of file Accelerator.h.

Constructor & Destructor Documentation

◆ AcceleratorServiceThread()

AcceleratorServiceThread::AcceleratorServiceThread ( )

Definition at line 261 of file Accelerator.cpp.

References impl.

◆ ~AcceleratorServiceThread()

AcceleratorServiceThread::~AcceleratorServiceThread ( )

Definition at line 265 of file Accelerator.cpp.

References stop().

Member Function Documentation

◆ addListener()

void AcceleratorServiceThread::addListener ( std::initializer_list< ReadChannelPort * >  listenPorts,
std::function< void(ReadChannelPort *, MessageData)>  callback 
)

When there's data on any of the listenPorts, call the callback.

Callable from any thread.

Definition at line 277 of file Accelerator.cpp.

References assert(), and impl.

◆ stop()

void AcceleratorServiceThread::stop ( )

Instruct the service thread to stop running.

Definition at line 267 of file Accelerator.cpp.

References impl.

Referenced by ~AcceleratorServiceThread().

Member Data Documentation

◆ impl

std::unique_ptr<Impl> esi::AcceleratorServiceThread::impl
private

Definition at line 180 of file Accelerator.h.

Referenced by AcceleratorServiceThread(), addListener(), and stop().


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