Skip to main content

spawn

Function spawn 

Source
pub fn spawn(handle: ServerHandle, bus: Arc<EventBus>) -> SubscriptionId
Expand description

Subscribe handle to every LspDocumentChanged event on bus (M.5.5; previously Event::DocumentChanged) and spawn a tokio task that forwards them as RecordEdit actor commands. Returns the subscription id; the supervisor must hand this to [EventBus::unsubscribe] when the actor is dropped to keep the bus’s bucket from accumulating dead entries.