1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Streaming worker events (`CONTEXT.md` §8 lifecycle, §6 stream pane).
//!
//! A worker emits events as it runs; the dispatcher forwards them to the
//! interface's stream pane. The channel is the worker's only way to narrate
//! progress before its final [`ExecuteResult`](super::ExecuteResult).
use ;
/// A single streamed event from a running worker.
/// The sink a worker writes events to. The dispatcher owns the receiver.
///
/// Unbounded so a worker never blocks on a slow consumer; events are cheap and
/// the UI drains them promptly.
pub type EventSink = UnboundedSender;
/// Convenience: send an event, ignoring the error if the receiver is gone
/// (e.g. the run was cancelled and the dispatcher dropped its end).