VR-Forces 5.0.3 Lua Function Documentation

AsyncJob

(For high level concepts about how to use Lua to write scripted tasks, please see VR-Forces User's Guide.)

An AsyncJob represents a the status of a job that is running asynchronously to the Lua task. Some functions return an asynchronous job when the result of the request cannot be returned immediately. The AsyncJob allows the Lua script to check on the status of the request periodically and obtain the result when the job finishes. The output of an AsyncJob is specific to the function which returns the job.

Function List

cancel () Cancels an active job.
getObject () Returns the result of the job.


Functions

cancel ()
Cancels an active job.
getObject ()
Returns the result of the job.

Return values:

  1. The computed result of the job. The object returned will depend on the request function that originally returned this AsyncJob.
  2. The index of the returned value. Allows the implementation to distinguish between different values computed over time. The index will be 0 until the job finishes, and in most cases will have a value of 1 when complete.
  3. A message string used to convey an error if a job fails.

Copyright© 2023 MAK Technologies, Inc. All rights reserved.