Face Engine SDK  5.23.1
A face detection, recognition and tracking engine.
fsdk::IAsyncContext Struct Reference

Interface for running tasks asynchronously. More...

#include <IAsyncContext.h>

Inheritance diagram for fsdk::IAsyncContext:
fsdk::IRefCounted

List of all members.

Public Member Functions

virtual int8_t threads () const noexcept=0
 Returns size of underlying thread pool.
virtual bool valid () const noexcept=0
 Tells validness of internal state.
virtual bool clearTaskQueue () noexcept=0
 Clears tasks not yet taken by any thread.
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.
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.

Detailed Description

Interface for running tasks asynchronously.

Contains thread pool under hood.


Member Function Documentation

virtual bool fsdk::IAsyncContext::clearTaskQueue ( ) [pure virtual]

Clears tasks not yet taken by any thread.

Returns:
True on success, false otherwise.
virtual bool fsdk::IAsyncContext::resize ( const int8_t  newThreadCount) [pure virtual]

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.
virtual bool fsdk::IAsyncContext::stop ( ) [pure virtual]

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.
virtual int8_t fsdk::IAsyncContext::threads ( ) const [pure virtual]

Returns size of underlying thread pool.

Returns:
Count of threads.
virtual bool fsdk::IAsyncContext::valid ( ) const [pure virtual]

Tells validness of internal state.

Returns:
True if valid, false otherwise.

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines