Skip to content

Fix coroutine not awaited warning #1129

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

Merged
merged 5 commits into from
Dec 10, 2024

Conversation

robsdedude
Copy link
Member

@robsdedude robsdedude commented Dec 5, 2024

When a certain deadline passed, the driver will not even attempt certain IO operations. By not calling the coroutine function to then ignore it under these circumstances (causing the warning), but instead deferring creation of the coroutine until it is clear we want to await it, we avoid the warning.

Functionally this changes nothing, but makes the driver less noise (and probably a better async citizen 🏅).

When a certain deadline passed, the driver will not even attempt certain IO
operations. By not calling the coroutine function to then ignore it under these
circumstances (causing the warning), but instead deferring creation of the
coroutine until it is clear we want to await it, we avoid the warning.

Functionally, this changes nothing, but makes the driver less noise (and
probably a better async citizen 🏅).
MaxAake and others added 2 commits December 9, 2024 12:16
@robsdedude robsdedude requested a review from MaxAake December 9, 2024 16:16
Copy link
Contributor

@MaxAake MaxAake left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@robsdedude robsdedude merged commit b957a74 into neo4j:5.0 Dec 10, 2024
20 checks passed
@robsdedude robsdedude deleted the fix/unawaited-coroutine-warning branch December 10, 2024 15:57
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