OpenCV  4.9.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
cv::AsyncArray Class Reference

Returns result of asynchronous operations. More...

#include <opencv2/core/async.hpp>

Collaboration diagram for cv::AsyncArray:

Public Member Functions

 AsyncArray () CV_NOEXCEPT
 
 AsyncArray (AsyncArray &&o)
 
 AsyncArray (const AsyncArray &o) CV_NOEXCEPT
 
 ~AsyncArray () CV_NOEXCEPT
 
void * _getImpl () const CV_NOEXCEPT
 
void get (OutputArray dst) const
 
template<typename _Rep , typename _Period >
bool get (OutputArray dst, const std::chrono::duration< _Rep, _Period > &timeout)
 
bool get (OutputArray dst, double timeoutNs) const
 
bool get (OutputArray dst, int64 timeoutNs) const
 
AsyncArrayoperator= (AsyncArray &&o) CV_NOEXCEPT
 
AsyncArrayoperator= (const AsyncArray &o) CV_NOEXCEPT
 
void release () CV_NOEXCEPT
 
bool valid () const CV_NOEXCEPT
 
template<typename _Rep , typename _Period >
bool wait_for (const std::chrono::duration< _Rep, _Period > &timeout)
 
bool wait_for (double timeoutNs) const
 
bool wait_for (int64 timeoutNs) const
 

Protected Attributes

Implp
 

Friends

struct Impl
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~AsyncArray()

cv::AsyncArray::~AsyncArray ( )

◆ AsyncArray() [1/3]

cv::AsyncArray::AsyncArray ( )
Python:
cv.AsyncArray() -> <AsyncArray object>

◆ AsyncArray() [2/3]

cv::AsyncArray::AsyncArray ( const AsyncArray o)
Python:
cv.AsyncArray() -> <AsyncArray object>

◆ AsyncArray() [3/3]

cv::AsyncArray::AsyncArray ( AsyncArray &&  o)
inline
Python:
cv.AsyncArray() -> <AsyncArray object>

Member Function Documentation

◆ _getImpl()

void * cv::AsyncArray::_getImpl ( ) const
inline

◆ get() [1/4]

void cv::AsyncArray::get ( OutputArray  dst) const
Python:
cv.AsyncArray.get([, dst]) -> dst
cv.AsyncArray.get(timeoutNs[, dst]) -> retval, dst

Fetch the result.

Parameters
[out]dstdestination 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/4]

template<typename _Rep , typename _Period >
bool cv::AsyncArray::get ( OutputArray  dst,
const std::chrono::duration< _Rep, _Period > &  timeout 
)
inline
Python:
cv.AsyncArray.get([, dst]) -> dst
cv.AsyncArray.get(timeoutNs[, dst]) -> retval, dst

◆ get() [3/4]

bool cv::AsyncArray::get ( OutputArray  dst,
double  timeoutNs 
) const
inline
Python:
cv.AsyncArray.get([, dst]) -> dst
cv.AsyncArray.get(timeoutNs[, dst]) -> retval, dst
Here is the call graph for this function:

◆ get() [4/4]

bool cv::AsyncArray::get ( OutputArray  dst,
int64  timeoutNs 
) const
Python:
cv.AsyncArray.get([, dst]) -> dst
cv.AsyncArray.get(timeoutNs[, dst]) -> retval, dst

Retrieving the result with timeout

Parameters
[out]dstdestination array
[in]timeoutNstimeout 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.

◆ operator=() [1/2]

AsyncArray & cv::AsyncArray::operator= ( AsyncArray &&  o)
inline

◆ operator=() [2/2]

AsyncArray & cv::AsyncArray::operator= ( const AsyncArray o)

◆ release()

void cv::AsyncArray::release ( )
Python:
cv.AsyncArray.release() -> None

◆ valid()

bool cv::AsyncArray::valid ( ) const
Python:
cv.AsyncArray.valid() -> retval

◆ wait_for() [1/3]

template<typename _Rep , typename _Period >
bool cv::AsyncArray::wait_for ( const std::chrono::duration< _Rep, _Period > &  timeout)
inline
Python:
cv.AsyncArray.wait_for(timeoutNs) -> retval

◆ wait_for() [2/3]

bool cv::AsyncArray::wait_for ( double  timeoutNs) const
inline
Python:
cv.AsyncArray.wait_for(timeoutNs) -> retval
Here is the call graph for this function:

◆ wait_for() [3/3]

bool cv::AsyncArray::wait_for ( int64  timeoutNs) const
Python:
cv.AsyncArray.wait_for(timeoutNs) -> retval

Friends And Related Symbol Documentation

◆ Impl

friend struct Impl
friend

Member Data Documentation

◆ p

Impl* cv::AsyncArray::p
protected

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