mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 19:21:13 +00:00
*: Bump async-std to v1.6.5 (#7306)
* *: Bump async-std to v1.6.5 Prevent users from using v1.6.4 which faces issues receiving incoming TCP connections. See https://github.com/async-rs/async-std/issues/888 for details. * client/network/src/gossip: Use channel instead of condvar `async_std::sync::Condvar::wait_timeout` uses `gloo_timers::callback::Timeout` when compiled for `wasm32-unknown-unknown`. This timeout implementation does not fulfill the requirement of being `Send`. Instead of using a `Condvar` use a `futures::channel::mpsc` to signal progress from the `QueuedSender` to the background `Future`. * client/network/Cargo.toml: Remove async-std unstable feature * client/network/src/gossip: Forward all queued messages * client/network/gossip: Have QueuedSender methods take &mut self * client/network/gossip: Move queue_size_limit into QueuedSender The `queue_size_limit` field is only accessed by `QueuedSender`, thus there is no need to share it between the background future and the `QueuedSender`. * client/network/gossip: Rename background task to future To be a bit picky the background task is not a task in the sense of an asynchonous task, but rather a background future in the sense of `futures::future::Future`.
This commit is contained in:
@@ -180,7 +180,7 @@ fn basic_works() {
|
||||
});
|
||||
|
||||
async_std::task::block_on(async move {
|
||||
let (sender, bg_future) =
|
||||
let (mut sender, bg_future) =
|
||||
QueuedSender::new(node1, node2_id, ENGINE_ID, NUM_NOTIFS, |msg| msg);
|
||||
async_std::task::spawn(bg_future);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user