diff --git a/core/src/nodes/tasks/manager.rs b/core/src/nodes/tasks/manager.rs index b17b1cf3..505e0ef8 100644 --- a/core/src/nodes/tasks/manager.rs +++ b/core/src/nodes/tasks/manager.rs @@ -67,7 +67,7 @@ pub struct Manager { /// `local_spawns` list instead. threads_pool: Option, - /// If no executor is available, we move tasks to this list, and futures are polled on the + /// If no executor is available, we move tasks to this set, and futures are polled on the /// current thread instead. local_spawns: FuturesUnordered + Send>>>, @@ -237,7 +237,12 @@ impl Manager { let msg = ToTaskMessage::HandlerEvent(event.clone()); match task.sender.start_send(msg) { Ok(()) => {}, - Err(ref err) if err.is_full() => {}, // TODO: somehow report to user? + Err(ref err) if err.is_full() => { + // Note that the user is expected to call `poll_ready_broadcast` beforehand, + // which returns `Poll::Ready` only if the channel isn't full. Reaching this + // path always indicates a mistake in the code. + log::warn!("start_broadcast called while channel was full"); + }, Err(_) => {}, } }