Skip to content

Prevent iterate over already consumed Result #896

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
Mar 15, 2022

Conversation

bigmontz
Copy link
Contributor

@bigmontz bigmontz commented Mar 10, 2022

for await (const r of result) in already consumed results could block for ever since no new event will came from wire.

Blocking this kind of access improves not correct access to the Result object.

This change also includes the addition of Result.isOpen()

@bigmontz bigmontz changed the title 5.0 result scope Prevent resolve or iterate over already consumed Result Mar 10, 2022
@bigmontz
Copy link
Contributor Author

Depends on: neo4j-drivers/testkit#420

Copy link
Member

@robsdedude robsdedude left a comment

Choose a reason for hiding this comment

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

bigmontz and others added 5 commits March 15, 2022 13:44
This `result.then` and `for await (const r of result)` in already consumed results could block for ever since no new event will came from wire.

Blocking this kind of access improves not correct access to the Result object.

This change also includes the addition of `Result.isOpen()`
@bigmontz bigmontz changed the title Prevent resolve or iterate over already consumed Result Prevent iterate over already consumed Result Mar 15, 2022
@bigmontz bigmontz merged commit 8696921 into neo4j:5.0 Mar 15, 2022
@bigmontz bigmontz deleted the 5.0-result-scope branch March 15, 2022 15:44
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