A ThreadSafe class to protect access of an object behind a mutex.
Consumers must call Lock() to get a reference to the object, the reference does locking with RAII, they are also non copyable and non movable to prevent the reference from "escaping" the lock.
Mutations happen directly on the usd session layer as updates comes in, all updates are done on the subscription threads. Previously updates are done in a mix of the subscription threads and the main thread.
No longer uses polling to update the scene, a service request to <world>/scene/info is done at the start to populate the stage, then a subscription to <world>/scene/info and <world>/scene/deletion to update the scene as models are added and removed.
As a result, there is no longer a need to resolve the scene changes between each poll request.
At each tick on the main render thread, the mutations on the session layer is committed to omniverse.
[ ] While waiting for a review on your PR, please help review another open pull request to support the maintainers
Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.
🎉 New feature
Summary
General outline of the refactor
ThreadSafe
class to protect access of an object behind a mutex.Lock()
to get a reference to the object, the reference does locking with RAII, they are also non copyable and non movable to prevent the reference from "escaping" the lock.<world>/scene/info
is done at the start to populate the stage, then a subscription to<world>/scene/info
and<world>/scene/deletion
to update the scene as models are added and removed.TODO: Test meshes support
Test it
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.