# InlineFunctorProcessor Class Reference

A base class that will allow you to call YieldOnFunctor() from within a function, and continue with that function when the asynchronous processing has completed. More...

`#include <InlineFunctor.h>`

List of all members.

## Public Member Functions
void | StartThreads (int numThreads)
void | StopThreads (bool blockOnCurrentProcessing)
void | YieldOnFunctor (InlineFunctor *inlineFunctor)
## Protected Member Functions
unsigned | GetCallDepth (void) const
| Returns the number of functors that were passed to the system.
## Protected Attributes
RakNet::FunctionThread | functionThread
| Used to create a thread that processes functors.
DataStructures::List< bool > | completedThreads
| Tracks which threads have been completed.

## Detailed Description

A base class that will allow you to call YieldOnFunctor() from within a function, and continue with that function when the asynchronous processing has completed.

## Member Function Documentation

void InlineFunctorProcessor::StartThreads | ( | int | numThreads | ) |

Start the threads. Should call this first

Parameters:

  `[in]` | numThreads | How many worker threads to start

Note:
  If only one thread is started, then the calls to YieldOnFunctor will process in that order

void InlineFunctorProcessor::StopThreads | ( | bool | blockOnCurrentProcessing | ) |

Stop the threads

Parameters:

  `[in]` | blockOnCurrentProcessing | Wait for the current processing to finish?

void InlineFunctorProcessor::YieldOnFunctor | ( | InlineFunctor * | inlineFunctor | ) |

Yield processing in the current function, continuing with the function implemented by CallYieldFunction When the functor completes, this function will return and the caller will continue processing

Parameters:

  `[in]` | inlineFunctor | A class that implements Functor::Process() to perform processing that can work asynchronously, such as loading a file or doing a database call

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

- d:/RakNet-3.x/Source/InlineFunctor.h