| Face Engine SDK 5.35.0 A face detection, recognition and tracking engine.

Public Member Functions | List of all members
fsdk::IAsyncContext Struct Referenceabstract

Interface for running tasks asynchronously. More...

`#include <IAsyncContext.h>`

Inheritance diagram for fsdk::IAsyncContext:

## Public Member Functions
virtual int8_t | threads () const noexcept=0
| Returns size of underlying thread pool. More...
virtual bool | valid () const noexcept=0
| Tells validness of internal state. More...
virtual bool | clearTaskQueue () noexcept=0
| Clears tasks not yet taken by any thread. More...
virtual bool | resize (const int8_t newThreadCount) noexcept=0
| Resizes internal thread pool to some new size param newThreadCount New size of thread pool. Should not be less than 1. More...
virtual bool | stop () noexcept=0
| Waits for all already running tasks to complete, then stops every thread. Do not use threadpool afterwards. Is called on destruction. More...
Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t | retain () noexcept=0
| Increase strong reference count. More...
virtual int32_t | retainLocked () noexcept=0
| Increase strong reference count thread safely. More...
virtual int32_t | release () noexcept=0
| Decrease strong reference count. More...
virtual int32_t | getRefCount () const noexcept=0
| Get actual strong reference count. More...
virtual int32_t | retainWeak () noexcept=0
| Increase weak reference count. More...
virtual int32_t | releaseWeak () noexcept=0
| Decrease weak reference count. More...
virtual int32_t | getWeakRefCount () const noexcept=0
| Get actual weak reference count. More...

## Detailed Description

Interface for running tasks asynchronously.

Contains thread pool under hood.

## Member Function Documentation

## ◆ clearTaskQueue()

virtual bool fsdk::IAsyncContext::clearTaskQueue | ( |  | ) |
| pure virtualnoexcept

Clears tasks not yet taken by any thread.

Returns
  True on success, false otherwise.

## ◆ resize()

virtual bool fsdk::IAsyncContext::resize | ( | const int8_t | newThreadCount | ) |
| pure virtualnoexcept

Resizes internal thread pool to some new size param newThreadCount New size of thread pool. Should not be less than 1.

Returns
  True on success, false otherwise.

## ◆ stop()

virtual bool fsdk::IAsyncContext::stop | ( |  | ) |
| pure virtualnoexcept

Waits for all already running tasks to complete, then stops every thread. Do not use threadpool afterwards. Is called on destruction.

Returns
  True on success, false otherwise.

## ◆ threads()

virtual int8_t fsdk::IAsyncContext::threads | ( |  | ) | const
| pure virtualnoexcept

Returns size of underlying thread pool.

Returns
  Count of threads.

## ◆ valid()

virtual bool fsdk::IAsyncContext::valid | ( |  | ) | const
| pure virtualnoexcept

Tells validness of internal state.

Returns
  True if valid, false otherwise.

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

- include/fsdk/IAsyncContext.h