Skip to content

Conversation

@seanmonstar
Copy link
Member

As noted in #355, the ValueDrain iterator has un-synchronized mutation of the extra_values Vec, and using a Drain, a user can get multiple ValueDrains at the same time and use them in scoped threads.

This changes the ValueDrain internals to eagerly drain the extra values when created, instead of lazily, so that calling next is no longer mutating a shared vector internally.

Closes #355

@seanmonstar seanmonstar force-pushed the drain-valuedrain-eagerly branch from 04b2101 to 1110571 Compare November 26, 2019 01:39
Copy link
Collaborator

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

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.

HeaderMap::Drain can cause data race

3 participants