diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f4aef46..90d753cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.3.5 + +### Bug Fix +- Fix resolve cpu load issue of prepare_uninitialized_buffer + ## 0.3.4 ### Features diff --git a/secio/Cargo.toml b/secio/Cargo.toml index abc835f9..efe30339 100644 --- a/secio/Cargo.toml +++ b/secio/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tentacle-secio" -version = "0.4.3" +version = "0.4.4" license = "MIT" description = "Secio encryption protocol for p2p" authors = ["piaoliu ", "Nervos Core Dev "] diff --git a/tentacle/Cargo.toml b/tentacle/Cargo.toml index fc2a3e58..5bed2bfa 100644 --- a/tentacle/Cargo.toml +++ b/tentacle/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tentacle" -version = "0.3.4" +version = "0.3.5" license = "MIT" description = "Minimal implementation for a multiplexed p2p network framework." authors = ["piaoliu ", "Nervos Core Dev "] @@ -16,8 +16,8 @@ all-features = false no-default-features = true [dependencies] -yamux = { path = "../yamux", version = "0.2.9", default-features = false, package = "tokio-yamux"} -secio = { path = "../secio", version = "0.4.3", package = "tentacle-secio" } +yamux = { path = "../yamux", version = "0.2.10", default-features = false, package = "tokio-yamux"} +secio = { path = "../secio", version = "0.4.4", package = "tentacle-secio" } futures = { version = "0.3.0" } tokio = { version = "0.2.0" } diff --git a/tentacle/src/runtime/async_runtime.rs b/tentacle/src/runtime/async_runtime.rs index 59a58495..8d2b2724 100644 --- a/tentacle/src/runtime/async_runtime.rs +++ b/tentacle/src/runtime/async_runtime.rs @@ -108,6 +108,13 @@ mod os { ) -> Poll> { AsyncRead::poll_read(Pin::new(&mut self.0), cx, buf) } + + unsafe fn prepare_uninitialized_buffer( + &self, + _buf: &mut [std::mem::MaybeUninit], + ) -> bool { + false + } } impl AsyncWrite for TcpStream { diff --git a/tentacle/src/runtime/mod.rs b/tentacle/src/runtime/mod.rs index 854da251..189c1cdd 100644 --- a/tentacle/src/runtime/mod.rs +++ b/tentacle/src/runtime/mod.rs @@ -112,6 +112,10 @@ where ) -> Poll> { AsyncRead::poll_read(Pin::new(&mut self.0), cx, buf) } + + unsafe fn prepare_uninitialized_buffer(&self, _buf: &mut [std::mem::MaybeUninit]) -> bool { + false + } } impl AsyncWrite for CompatStream @@ -149,6 +153,10 @@ where ) -> Poll> { FutureAsyncRead::poll_read(self, cx, buf) } + + unsafe fn prepare_uninitialized_buffer(&self, _buf: &mut [std::mem::MaybeUninit]) -> bool { + false + } } impl AsyncWrite for CompatStream2 diff --git a/tentacle/src/transports/browser.rs b/tentacle/src/transports/browser.rs index 5303c156..940ff5f1 100644 --- a/tentacle/src/transports/browser.rs +++ b/tentacle/src/transports/browser.rs @@ -241,6 +241,10 @@ impl AsyncRead for BrowserStream { } } } + + unsafe fn prepare_uninitialized_buffer(&self, _buf: &mut [std::mem::MaybeUninit]) -> bool { + false + } } impl AsyncWrite for BrowserStream { diff --git a/tentacle/src/transports/ws.rs b/tentacle/src/transports/ws.rs index 039f5780..8621a688 100644 --- a/tentacle/src/transports/ws.rs +++ b/tentacle/src/transports/ws.rs @@ -382,6 +382,10 @@ impl AsyncRead for WsStream { Poll::Pending => Poll::Pending, } } + + unsafe fn prepare_uninitialized_buffer(&self, _buf: &mut [std::mem::MaybeUninit]) -> bool { + false + } } impl AsyncWrite for WsStream { diff --git a/yamux/Cargo.toml b/yamux/Cargo.toml index 83d2d707..f3852a61 100644 --- a/yamux/Cargo.toml +++ b/yamux/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tokio-yamux" -version = "0.2.9" +version = "0.2.10" license = "MIT" repository = "https://github.com/nervosnetwork/tentacle" description = "Rust implementation of Yamux" diff --git a/yamux/src/session.rs b/yamux/src/session.rs index 05c6c993..152efc67 100644 --- a/yamux/src/session.rs +++ b/yamux/src/session.rs @@ -873,6 +873,13 @@ mod test { Poll::Ready(Ok(n)) } } + + unsafe fn prepare_uninitialized_buffer( + &self, + _buf: &mut [std::mem::MaybeUninit], + ) -> bool { + false + } } impl AsyncWrite for MockSocket {