Face Engine SDK 5.25.0
A face detection, recognition and tracking engine.
Loading...
Searching...
No Matches
fsdk::IAsyncContext Struct Referenceabstract

Interface for running tasks asynchronously. More...

#include <IAsyncContext.h>

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

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.
 
- Public Member Functions inherited from fsdk::IRefCounted
virtual int32_t retain () noexcept=0
 Increase strong reference count.
 
virtual int32_t retainLocked () noexcept=0
 Increase strong reference count thread safely.
 
virtual int32_t release () noexcept=0
 Decrease strong reference count.
 
virtual int32_t getRefCount () const noexcept=0
 Get actual strong reference count.
 
virtual int32_t retainWeak () noexcept=0
 Increase weak reference count.
 
virtual int32_t releaseWeak () noexcept=0
 Decrease weak reference count.
 
virtual int32_t getWeakRefCount () const noexcept=0
 Get actual weak reference count.
 

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: