Remove Send from ValueDrain iterator - #361
Conversation
8ee74df to
cfc1853
Compare
hawkw
left a comment
There was a problem hiding this comment.
do you think this necessitates an 0.2 release, given
While technically a breaking change, it's expected to not affect anyone, and is the least-bad solution.
|
The point is to fix technically unsound behavior, without forcing user's to deal with all the other breaking changes. |
|
yeah, i just wasn't sure if it was a concern that this is technically a semver violation. seems fine to me 👍 |
|
What was the reason to opt for this instead of move values eagerly into the iterator? |
|
Moving them eagerly adds a cost of allocation even if you're not going to use them, just to save a super obscure case. |
|
@seanmonstar it could be "optimized" to be a small vec, then the allocation is avoided in most cases. |
|
Is all that fiddling worth not making this change? Do we expect even a single person to be sending |
|
Making it |
|
Bleck, gross. I've open #362 with a different solution. |
As noted in #355, the
ValueDrainiterator has un-synchronized mutation of theextra_valuesVec, and using aDrain, a user can get multipleValueDrains at the same time and use them in scoped threads.This change removes the
SendandSynctraits fromValueDrain. While technically a breaking change, it's expected to not affect anyone, and is the least-bad solution.