@@ -46,8 +46,8 @@ impl SourceContext {
4646
4747 /// Installs the shutdown handle for this source context.
4848 ///
49- /// Called once by the runtime, before the component runs, with the shutdown signal of the
50- /// component's dedicated supervisor.
49+ /// Called once by the runtime, before the component runs, with the shutdown signal of the component's dedicated
50+ /// supervisor.
5151 pub ( crate ) fn set_shutdown_handle ( & mut self , shutdown_handle : ShutdownHandle ) {
5252 self . shutdown_handle = Some ( shutdown_handle) ;
5353 }
@@ -70,31 +70,31 @@ impl SourceContext {
7070 self . health_handle . take ( ) . expect ( "health handle already taken" )
7171 }
7272
73- /// Gets a reference to the topology context.
73+ /// Returns a reference to the topology context.
7474 pub fn topology_context ( & self ) -> & TopologyContext {
7575 & self . inner . topology_context
7676 }
7777
78- /// Gets a reference to the component context.
78+ /// Returns a reference to the component context.
7979 pub fn component_context ( & self ) -> & ComponentContext {
8080 & self . inner . component_context
8181 }
8282
83- /// Gets a reference to the component registry.
83+ /// Returns a reference to the component registry.
8484 pub fn component_registry ( & self ) -> & ComponentRegistry {
8585 & self . inner . component_registry
8686 }
8787
88- /// Gets a reference to the events dispatcher.
88+ /// Returns a reference to the events dispatcher.
8989 pub fn dispatcher ( & self ) -> & EventsDispatcher {
9090 & self . inner . dispatcher
9191 }
9292
9393 /// Returns a spawner for supervised child tasks belonging to this component.
9494 ///
95- /// Children spawned through it have their lifecycle coupled to the component itself: if the
96- /// component restarts, or the component's supervisor dies, its children are terminated too .
97- pub fn spawn_handle ( & self ) -> & ComponentSpawner {
95+ /// All child tasks spawned through this mechanism are tied to the lifecycle of the component itself, such that
96+ /// they're automatically shutdown/stopped when the component is stopped during topology shutdown, etc .
97+ pub fn spawner ( & self ) -> & ComponentSpawner {
9898 & self . inner . spawner
9999 }
100100}
0 commit comments