Returns result of asynchronous operations.
More...
#include <opencv2/core/async.hpp>
Returns result of asynchronous operations.
Object has attached asynchronous state. Assignment operator doesn't clone asynchronous state (it is shared between all instances).
Result can be fetched via get() method only once.
- Examples:
- samples/dnn/object_detection.cpp.
◆ ~AsyncArray()
cv::AsyncArray::~AsyncArray |
( |
| ) |
|
◆ AsyncArray() [1/2]
cv::AsyncArray::AsyncArray |
( |
| ) |
|
◆ AsyncArray() [2/2]
cv::AsyncArray::AsyncArray |
( |
const AsyncArray & |
o | ) |
|
◆ _getImpl()
void* cv::AsyncArray::_getImpl |
( |
| ) |
const |
|
inline |
◆ get() [1/3]
Python: |
---|
| cv.AsyncArray.get( | [, dst] | ) -> | dst |
| cv.AsyncArray.get( | timeoutNs[, dst] | ) -> | retval, dst |
Fetch the result.
- Parameters
-
[out] | dst | destination array |
Waits for result until container has valid result. Throws exception if exception was stored as a result.
Throws exception on invalid container state.
- Note
- Result or stored exception can be fetched only once.
- Examples:
- samples/dnn/object_detection.cpp.
◆ get() [2/3]
Python: |
---|
| cv.AsyncArray.get( | [, dst] | ) -> | dst |
| cv.AsyncArray.get( | timeoutNs[, dst] | ) -> | retval, dst |
Retrieving the result with timeout
- Parameters
-
[out] | dst | destination array |
[in] | timeoutNs | timeout in nanoseconds, -1 for infinite wait |
- Returns
- true if result is ready, false if the timeout has expired
- Note
- Result or stored exception can be fetched only once.
◆ get() [3/3]
bool cv::AsyncArray::get |
( |
OutputArray |
dst, |
|
|
double |
timeoutNs |
|
) |
| const |
|
inline |
Python: |
---|
| cv.AsyncArray.get( | [, dst] | ) -> | dst |
| cv.AsyncArray.get( | timeoutNs[, dst] | ) -> | retval, dst |
◆ operator=()
◆ release()
void cv::AsyncArray::release |
( |
| ) |
|
Python: |
---|
| cv.AsyncArray.release( | | ) -> | None |
◆ valid()
bool cv::AsyncArray::valid |
( |
| ) |
const |
Python: |
---|
| cv.AsyncArray.valid( | | ) -> | retval |
◆ wait_for() [1/2]
bool cv::AsyncArray::wait_for |
( |
int64 |
timeoutNs | ) |
const |
Python: |
---|
| cv.AsyncArray.wait_for( | timeoutNs | ) -> | retval |
◆ wait_for() [2/2]
bool cv::AsyncArray::wait_for |
( |
double |
timeoutNs | ) |
const |
|
inline |
Python: |
---|
| cv.AsyncArray.wait_for( | timeoutNs | ) -> | retval |
◆ Impl
The documentation for this class was generated from the following file: