Skip to content

Document cancel-safety of FuturesUnordered::poll_next#2897

Open
akonradi-signal wants to merge 2 commits into
rust-lang:mainfrom
akonradi-signal:futures-unordered-cancel-safety-doc
Open

Document cancel-safety of FuturesUnordered::poll_next#2897
akonradi-signal wants to merge 2 commits into
rust-lang:mainfrom
akonradi-signal:futures-unordered-cancel-safety-doc

Conversation

@akonradi-signal

Copy link
Copy Markdown

No description provided.

///
/// # Cancel safety
///
/// This type is cancellation-safe. If [`poll_next`](Stream::poll_next) is

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it cancellation-safe independent of the inner type?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good question. I think not; if the inner future type F shouldn't be dropped before it resolves, then a FuturesUnordered<F> shouldn't be dropped before it's empty. I'll update the PR.

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