mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-04 20:21:33 +00:00
Fix a typo and grammar and add a clarification. (#688)
* Fix a typo and grammar and add a clarification. * Update core/src/nodes/handled_node_tasks.rs Co-Authored-By: jamesray1 <16969914+jamesray1@users.noreply.github.com>
This commit is contained in:
committed by
Pierre Krieger
parent
6cde480c29
commit
3556ffde5d
@ -58,7 +58,7 @@ use void::Void;
|
||||
|
||||
/// Implementation of `Stream` that handles a collection of nodes.
|
||||
pub struct HandledNodesTasks<TInEvent, TOutEvent, THandler> {
|
||||
/// For each active task, a sender allowing to transmit messages. Closing the sender interrupts
|
||||
/// A map between active tasks to an unbounded sender, used to control the task. Closing the sender interrupts
|
||||
/// the task. It is possible that we receive messages from tasks that used to be in this list
|
||||
/// but no longer are, in which case we should ignore them.
|
||||
tasks: FnvHashMap<TaskId, mpsc::UnboundedSender<TInEvent>>,
|
||||
@ -101,7 +101,7 @@ pub enum HandledNodesEvent<TOutEvent, THandler> {
|
||||
handler: Option<THandler>,
|
||||
},
|
||||
|
||||
/// A task has succeesfully connected to a node.
|
||||
/// A task has successfully connected to a node.
|
||||
NodeReached {
|
||||
/// Identifier of the task that succeeded.
|
||||
id: TaskId,
|
||||
@ -202,7 +202,7 @@ impl<TInEvent, TOutEvent, THandler> HandledNodesTasks<TInEvent, TOutEvent, THand
|
||||
self.tasks.keys().cloned()
|
||||
}
|
||||
|
||||
/// Provides an API similar to `Stream`, except that it cannot error.
|
||||
/// Provides an API similar to `Stream`, except that it cannot produce an error.
|
||||
pub fn poll(&mut self) -> Async<HandledNodesEvent<TOutEvent, THandler>> {
|
||||
for to_spawn in self.to_spawn.drain() {
|
||||
tokio_executor::spawn(to_spawn);
|
||||
|
Reference in New Issue
Block a user