Face Engine SDK  5.21.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
IAsyncContext.h
Go to the documentation of this file.
1 #pragma once
2 
9 #include <cstdint>
10 #include <fsdk/Def.h>
11 #include <fsdk/IRefCounted.h>
12 #include <fsdk/Types.h>
13 
14 namespace fsdk {
15 
16 #ifndef DOXYGEN_SHOULD_SKIP_THIS
17  DECLARE_SMARTPTR(IAsyncContext);
18 #endif
19 
29  virtual int8_t threads() const noexcept = 0;
30 
35  virtual bool valid() const noexcept = 0;
36 
41  virtual bool clearTaskQueue() noexcept = 0;
42 
48  virtual bool resize(const int8_t newThreadCount) noexcept = 0;
49 
55  virtual bool stop() noexcept = 0;
56  };
57 
58 } // namespace fsdk
virtual bool stop() noexcept=0
Waits for all already running tasks to complete, then stops every thread. Do not use threadpool after...
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
Common data types and structures.
Base strong reference counted object interface.
Definition: IRefCounted.h:37
Interface for running tasks asynchronously.
Definition: IAsyncContext.h:24
virtual int8_t threads() const noexcept=0
Returns size of underlying thread pool.
Common SDK definitions.
virtual bool resize(const int8_t newThreadCount) noexcept=0
Resizes internal thread pool to some new size param newThreadCount New size of 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.
Reference counted object interface.