con un clic
async-operations
// Asynchronous operation patterns including polling, timeouts, and non-blocking workflows. Use when user asks about async rendering, non-blocking operations, polling, timeouts, or parallel rendering.
// Asynchronous operation patterns including polling, timeouts, and non-blocking workflows. Use when user asks about async rendering, non-blocking operations, polling, timeouts, or parallel rendering.
High-level overview of a typical ovrtx application lifecycle. Use when user asks how to structure an ovrtx program, what the main steps are, or how the pieces fit together.
Creating persistent attribute bindings for efficient repeated writes to the same prims and attribute. Use when user asks about persistent bindings, repeated writes, efficient animation loops, bind_attribute, or updating transforms every frame with caller-owned tensors. Use mapping-attributes when the hot path needs zero-copy direct writes into ovrtx buffers.
Binding materials to prims at runtime. Use when user asks to assign a material, change a material, set material binding, or swap materials on a prim.
Available camera render outputs for Real-Time Path-Tracing (RT2) mode. Use when user asks what AOVs/render vars are available, what format or dtype an output has, or how to read a specific output like depth, normals, albedo, or distance.
Cloning USD subtrees to create copies at new paths. Use when user asks to clone, duplicate, copy a prim, or create instances of existing geometry.
Authoring and configuring OmniLidar sensor prims and lidar PointCloud render outputs. Use when user asks to create a lidar scene, configure an OmniLidar prim, choose lidar output frame/coordinate behavior, or request lidar PointCloud channels.
| name | async-operations |
| description | Asynchronous operation patterns including polling, timeouts, and non-blocking workflows. Use when user asks about async rendering, non-blocking operations, polling, timeouts, or parallel rendering. |
| license | LicenseRef-NvidiaProprietary |
| version | 0.3.0 |
| author | NVIDIA ovrtx |
| tags | ["ovrtx","async","operations"] |
| tools | ["Read","Grep"] |
Use this skill when the user asks about async rendering, non-blocking operations, polling, timeouts, or parallel rendering.
Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.
Operation, pending fetch object, C ovrtx_op_id_t, or result handle.> **Source:** snippet before writing or explaining API usage._async method, wait() for a pending fetch object, then fetch() the final result.wait(timeout_ns=0) first and handle None as "still running"; use a finite or infinite wait only when the workflow is ready to block.op_index, inspect operation errors, then fetch or destroy result handles as required.This skill has no scripts.
All ovrtx enqueue operations (open_usd, add_usd_reference, step, write_attribute, etc.) are internally asynchronous and stream-ordered. In Python, the default methods (e.g., open_usd, add_usd_reference, step) block until completion. The _async variants return Operation objects that support polling and custom timeouts.
In C, all enqueue calls return immediately with an ovrtx_op_id_t that can be polled or waited on.
Source:
tests/docs/python/test_support_api.pysnippetdoc-open-usd-asyncThe same polling pattern applies to
open_usd_asyncandadd_usd_reference_async— callop.wait(timeout_ns=0)to poll, orop.wait()to block.
Source:
tests/docs/python/test_camera_sensors.pysnippetdoc-step-async
Source:
examples/python/minimal/main.pysnippetstepThe synchronous
step()is equivalent tostep_async().wait().
In 0.3.0 the Python RendererResult return type was removed; step_async() now follows the standard two-phase Operation / PendingFetch lifecycle.
Source:
tests/docs/python/test_camera_sensors.pysnippetdoc-step-async
Operation.query_status() returns a point-in-time OperationStatus (state, progress, resource counters). Safe to call repeatedly while the op is PENDING; it becomes unavailable after wait() consumes the operation.
Source:
tests/docs/python/test_base.pysnippetdoc-operation-status
Source:
examples/c/minimal/main.cppsnippetload-usd-and-waitThe load snippet demonstrates polling with
ovrtx_timeout_t{0}.
Source:
examples/c/minimal/main.cppsnippetload-usd-and-wait
Source:
examples/c/minimal/main.cppsnippetstep-rendererUses
ovrtx_timeout_infiniteto block until completion.
Source:
examples/c/minimal/main.cppsnippetload-usd-and-waitCheck
wait_result.num_error_opsafter anyovrtx_wait_opcall.
For long-running operations (e.g., USD loading), call ovrtx_query_op_status(renderer, op_id, &status) to get progress and named resource counters, then ovrtx_release_op_status(renderer, &status) to release the returned pointers. Counter names are operation-dependent (e.g., "shaders", "textures", "materials" during USD loading). A total of 0 means the total is not yet known.
Source:
examples/python/status-queries/main.pysnippetwait-operation-with-statusSource:
examples/c/status-queries/main.cppsnippetwait-operation-with-status-c
For the full pattern, use the status-queries skill.
| Python | C |
|---|---|
Operation.wait(timeout_ns=None) | ovrtx_wait_op(renderer, op_id, timeout, &wait_result) |
Operation.wait(timeout_ns=0) | ovrtx_wait_op with timeout.time_out_ns = 0 |
Operation.wait() → PendingFetch, then .fetch() | ovrtx_wait_op + per-op fetch call (ovrtx_fetch_results / ovrtx_fetch_read_result / ovrtx_fetch_query_results) |
Operation.query_status() → OperationStatus | ovrtx_query_op_status(renderer, op_id, &status) + ovrtx_release_op_status(renderer, &status) |
RuntimeError on failure | wait_result.num_error_ops > 0 |
| Python copies status into dataclasses | ovrtx_release_op_status(renderer, &status) -- must call after each successful query |
C timeout constants:
ovrtx_timeout_t{0} -- non-blocking pollovrtx_timeout_infinite -- block indefinitelyovrtx_timeout_t{5000000000} -- 5 seconds in nanosecondsC wait result fields:
error_op_ids / num_error_ops -- operations that errored since last waitlowest_pending_op_id -- 0 if all operations complete, nonzero if still pendingOperation.wait() with no arguments blocks forever -- this is usually what you want.wait(timeout_ns=0) returns None on timeout, which is distinct from a successful result. For operations that return None on success (like reset_stage), use the Operation object's state to distinguish.Operation.query_status() before Operation.wait() completes; completed operations release their wait-phase context.ovrtx_wait_op waits for all operations up to and including the given op_id, not just that single operation.ovrtx_wait_op return status before interpreting wait_result fields.ovrtx_query_op_status() result with ovrtx_release_op_status().ovrtx_get_last_op_error() are valid only until the next ovrtx_wait_op call on the same thread.> **Source:** directives in this skill to locate tested snippets before reusing API patterns.