#74 Concurrent read and writes on Channel

Opened by WGH on Mar 13, 2022, 6:36 PM
// WGH on Mar 13, 2022, 6:36 PM

thrussh::client::Channel’s wait and data both take &mut self, so they can’t be called concurrently. Perhaps I’m missing something, but it looks like it makes duplex communication (e.g. interactive mode) impossible or very awkward.

It seems like in the Rust async world the usual solution to this is the split function, but Channel doesn’t implement Async{Read,Write}, and doesn’t have split method (like TcpStream, for example).