View Source Evision.AsyncArray (Evision v0.1.17)

Link to this section Summary

Types

t()

Type that represents an Evision.AsyncArray struct.

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()}

AsyncArray

Return

Python prototype (for reference only):

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

get

Positional Arguments
  • self: Evision.AsyncArray.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 only):

get([, dst]) -> dst
@spec get(t(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | {:error, String.t()}
@spec get(t(), number()) :: Evision.Mat.t() | false | {:error, String.t()}

Variant 1:

get

Positional Arguments
  • self: Evision.AsyncArray.t()

  • 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 only):

get(timeoutNs[, dst]) -> retval, dst

Variant 2:

get

Positional Arguments
  • self: Evision.AsyncArray.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 only):

get([, dst]) -> 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()}

get

Positional Arguments
  • self: Evision.AsyncArray.t()

  • 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 only):

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

release

Positional Arguments
  • self: Evision.AsyncArray.t()

Python prototype (for reference only):

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

valid

Positional Arguments
  • self: Evision.AsyncArray.t()
Return
  • retval: bool

Python prototype (for reference only):

valid() -> retval
Link to this function

wait_for(self, timeoutNs)

View Source
@spec wait_for(t(), number()) :: boolean() | {:error, String.t()}

wait_for

Positional Arguments
  • self: Evision.AsyncArray.t()
  • timeoutNs: double
Return
  • retval: bool

Python prototype (for reference only):

wait_for(timeoutNs) -> retval