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

Make AsyncioExecutor a shared resource across EngineClients #5976

Merged
merged 8 commits into from
Jan 5, 2023

Conversation

wcourtney
Copy link
Collaborator

This resolves issues in grpc/grpc#25364.

@wcourtney wcourtney marked this pull request as ready for review January 3, 2023 23:27
@wcourtney wcourtney requested review from a team, vtomole, cduck and verult as code owners January 3, 2023 23:27
@wcourtney wcourtney requested a review from dstrain115 January 4, 2023 18:23
cirq-google/cirq_google/engine/engine_client.py Outdated Show resolved Hide resolved
@@ -124,7 +130,7 @@ def __init__(

@cached_property
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest removing this cached_property decorator since there's no need to cache on each EngineClient instance as well as on the AsyncExecutor class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -122,9 +130,10 @@ def __init__(

self._service_args = service_args

@cached_property
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, need to add back @property since other places in the code call this like a property instead of a method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Fixed and tested; thanks!

@wcourtney wcourtney merged commit 0c4f742 into master Jan 5, 2023
@wcourtney wcourtney deleted the u/wcourtney/async branch January 5, 2023 01:38
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