View Source Evision.AsyncArray (Evision v0.1.14)

Link to this section Summary

Types

t()

Type that represents an Evision.AsyncArray struct.

Functions

Return

Python prototype (for reference):

Return
Positional Arguments
  • timeoutNs: double.

Positional Arguments
  • timeoutNs: double.

Python prototype (for reference):

Return
  • retval: bool

Python prototype (for reference):

Positional Arguments
  • timeoutNs: double
Return
  • retval: bool

Python prototype (for reference):

Link to this section Types

@type t() :: %Evision.AsyncArray{ref: reference()}

Type that represents an Evision.AsyncArray struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@spec asyncArray() :: t() | {:error, String.t()}
Return

Python prototype (for reference):

AsyncArray() -> <AsyncArray object>
@spec get(t()) :: Evision.Mat.t() | {:error, String.t()}
Return

Fetch the result.

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.

Python prototype (for reference):

get([, dst]) -> dst
@spec get(t(), number()) :: Evision.Mat.t() | false | {:error, String.t()}
Positional Arguments
  • timeoutNs: double.

    timeout in nanoseconds, -1 for infinite wait

Return

Retrieving the result with timeout

@returns true if result is ready, false if the timeout has expired Note: Result or stored exception can be fetched only once.

Python prototype (for reference):

get(timeoutNs[, dst]) -> retval, dst
Link to this function

get(self, timeoutNs, opts)

View Source
@spec get(t(), number(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | false | {:error, String.t()}
Positional Arguments
  • timeoutNs: double.

    timeout in nanoseconds, -1 for infinite wait

Return

Retrieving the result with timeout

@returns true if result is ready, false if the timeout has expired Note: Result or stored exception can be fetched only once.

Python prototype (for reference):

get(timeoutNs[, dst]) -> retval, dst
@spec release(t()) :: :ok | {:error, String.t()}

Python prototype (for reference):

release() -> None
@spec valid(t()) :: boolean() | {:error, String.t()}
Return
  • retval: bool

Python prototype (for reference):

valid() -> retval
Link to this function

wait_for(self, timeoutNs)

View Source
@spec wait_for(t(), number()) :: boolean() | {:error, String.t()}
Positional Arguments
  • timeoutNs: double
Return
  • retval: bool

Python prototype (for reference):

wait_for(timeoutNs) -> retval