Possibly unnecessary use of Mutex
in Merge
implementation?
#116
Labels
performance
computer goes brrrrr
Mutex
in Merge
implementation?
#116
This is more of a question than an issue right now, but may have want some action depending on the answer to the question.
I noticed in the implementation
impl<S, const N: usize> Stream for Merge<S, N>
thatWakerArray
is being used, which requires locking aMutex
for read/write. However, sincepoll_next
borrowsSelf
mutably, it's guaranteed that we won't get any re-entrant calls topoll_next
.Just wondering if there is a reason this is needed - something I'm missing - or whether there is room for improvement here, say a
WakerArray
implementation that didn't requireMutex
?Thanks!
The text was updated successfully, but these errors were encountered: