IOEventWorker.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/core/async/worker/IOEventWorker.hpp"

IOEventWorker

Event-based implementation of I/O worker.

  • kqueue based implementation - for Mac/BSD systems
  • epoll based implementation - for Linux systems

namespace oatpp { namespace async { namespace worker { 
  class IOEventWorker : public Worker {}
}}}

Methods

Return Type Name Summary
[none] IOEventWorker Constructor.
[none] ~IOEventWorker Virtual destructor.
void pushTasks Push list of tasks to worker.
void pushOneTask Push one task to worker.
void run Run worker.
void stop Break run loop.
void join Join all worker-threads.
void detach Detach all worker-threads.

IOEventWorker::IOEventWorker

Constructor.

IOEventWorker(IOEventWorkerForeman* foreman, Action::IOEventType specialization)

IOEventWorker::~IOEventWorker

Virtual destructor.

~IOEventWorker()

IOEventWorker::pushTasks

Push list of tasks to worker.

void pushTasks(oatpp::collection::FastQueue<CoroutineHandle>& tasks) override

IOEventWorker::pushOneTask

Push one task to worker.

  • @param task - CoroutineHandle.

void pushOneTask(CoroutineHandle* task) override

IOEventWorker::run

Run worker.

void run()

IOEventWorker::stop

Break run loop.

void stop() override

IOEventWorker::join

Join all worker-threads.

void join() override

IOEventWorker::detach

Detach all worker-threads.

void detach() override

IOEventWorkerForeman

Class responsible to assign I/O tasks to specific IOEventWorker according to worker's "specialization".
Needed in order to support full-duplex I/O mode without duplicating file-descriptors.

namespace oatpp { namespace async { namespace worker { 
  class IOEventWorkerForeman : public Worker {}
}}}

Methods

Return Type Name Summary
[none] IOEventWorkerForeman Constructor.
[none] ~IOEventWorkerForeman Virtual destructor.
void pushTasks Push list of tasks to worker.
void pushOneTask Push one task to worker.
void stop Break run loop.
void join Join all worker-threads.
void detach Detach all worker-threads.

IOEventWorkerForeman::IOEventWorkerForeman

Constructor.

IOEventWorkerForeman()

IOEventWorkerForeman::~IOEventWorkerForeman

Virtual destructor.

~IOEventWorkerForeman()

IOEventWorkerForeman::pushTasks

Push list of tasks to worker.

void pushTasks(oatpp::collection::FastQueue<CoroutineHandle>& tasks) override

IOEventWorkerForeman::pushOneTask

Push one task to worker.

  • @param task - CoroutineHandle.

void pushOneTask(CoroutineHandle* task) override

IOEventWorkerForeman::stop

Break run loop.

void stop() override

IOEventWorkerForeman::join

Join all worker-threads.

void join() override

IOEventWorkerForeman::detach

Detach all worker-threads.

void detach() override