We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c54cc31 + d690d23 commit b291184Copy full SHA for b291184
examples/02_04_executor/src/lib.rs
@@ -61,7 +61,7 @@ impl Spawner {
61
future: Mutex::new(Some(future)),
62
task_sender: self.task_sender.clone(),
63
});
64
- self.task_sender.send(task).expect("too many tasks queued");
+ self.task_sender.try_send(task).expect("too many tasks queued");
65
}
66
67
// ANCHOR_END: spawn_fn
@@ -74,7 +74,7 @@ impl ArcWake for Task {
74
let cloned = arc_self.clone();
75
arc_self
76
.task_sender
77
- .send(cloned)
+ .try_send(cloned)
78
.expect("too many tasks queued");
79
80
0 commit comments