Processor.hpp

This File On Github
Ask A Question

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

Processor

Asynchronous Processor.
Responsible for processing and managing multiple Coroutines.

namespace oatpp { namespace async { 
  class Processor {}
}}

Methods

Return Type Name Summary
void addCoroutine Add Coroutine to processor.
void addWaitingCoroutine Add Coroutine to processor in "waiting queue"
bool iterate Iterate Coroutines.
bool isEmpty Check if there is no more Coroutines in processor.

Processor::addCoroutine

Add Coroutine to processor.

  • @param coroutine - pointer to Coroutine.

void addCoroutine(AbstractCoroutine* coroutine)

Processor::addWaitingCoroutine

Add Coroutine to processor in "waiting queue"

  • @param coroutine

void addWaitingCoroutine(AbstractCoroutine* coroutine)

Processor::iterate

Iterate Coroutines.

  • @param numIterations - number of iterations.
  • @return - true if there are active Coroutines.

bool iterate(v_int32 numIterations)

Processor::isEmpty

Check if there is no more Coroutines in processor.

  • @return - true if all coroutines in all queues are finished.

bool isEmpty()