How do I wait for frames to render within the Isaac Sim UI

SyntheticDataHelper requires access to the app.update() function. Within the Isaac UI, if this function is called, the whole application hangs. Presumably the ui logic is being processed within the app.update() function itself and I’m creating a deadlock by calling app.update() twice. I have 20 cameras in my scene and I’d like to save each view as a jpeg. So my question is, how do I wait for the render to finish from within the UI so I can do this? I have chosen to create an extension and I wrote all my code in that extension. There is another post somewhere that says to use SyntheticDataHelper, we should be using OmniKitHelper. Using OmniKitHelper makes development really slow. If I make a mistake in the python code, I have to restart and wait for the kit to start all over again. So Id rather find a way to solve this using the extension where hot reloads are possible.

If you are writing an extension you can use asyncio and wait or the next frame to be ready

import asyncio
import omni.kit.app

async def my_task():
	print("my task begin")
	# Wait for next frame to be ready
	await omni.kit.app.get_app().next_update_async()
	print("next frame ready")
        # Write to disk

# Start task
asyncio.ensure_future(my_task())