Closed sham789 closed 1 year ago
Why this function needs &mut self?
&mut self
https://github.com/rust-lang/futures-rs/blob/41478f5e69dddc51939c2695cd6f66d6b7b70d54/futures-util/src/stream/stream/mod.rs#L287-L292
I found this issue while I was trying to spawn 2 distinct threads where:
Basically, having this &mut self I can't wrap the ws stream into Arc<RwLock<WebSocketStream>> to achieve my requirements
Arc<RwLock<WebSocketStream>>
Why this function needs
&mut self
?https://github.com/rust-lang/futures-rs/blob/41478f5e69dddc51939c2695cd6f66d6b7b70d54/futures-util/src/stream/stream/mod.rs#L287-L292
I found this issue while I was trying to spawn 2 distinct threads where:
Basically, having this
&mut self
I can't wrap the ws stream intoArc<RwLock<WebSocketStream>>
to achieve my requirements