Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mechanism to unblock dsgsessioon poll messages method when a PyEnSight gRPC request is incoming #505

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

mariostieriansys
Copy link
Collaborator

A few months ago Randy put in place a check in the DSGSession poll_messages method that avoids putting too many gRPC requests in the DSG queue.

This fixed an issue with Omniverse when large data with many DSG messages are being considered, but opened a new issue in case the DSG session is running in the same process with a PyEnSight session

PyEnSight has no knowledge that the poll_messages is idle, and when you send a new gRPC request through PyEnSight, the gRPC connection deadlocks

This PR fixes the issue, allowing to register a running DSGSession to a PyEnSight session, either directly or when creating the DSGSession, passing in as optional argument the PyEnSight session itself

In session.cmd, before sending the actual gRPC command, a flag is set to True so that if the DSGSession poll_message is idle, it will be temporarily unblocked, for the time the gRPC command runs on PyEnSight. This can allow temporarily the message queue in DSG to overcome the limit, but the flag is set back to False so that poll_messages gets idle again

@mariostieriansys mariostieriansys merged commit b01dbfb into main Jan 17, 2025
25 checks passed
@mariostieriansys mariostieriansys deleted the mostieri/grpc_pyensight_priority branch January 17, 2025 16:29
mariostieriansys added a commit that referenced this pull request Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants