pub fn spawn_scan_view_scan(
view: BufferId,
options: ScanViewOptions,
sources: Vec<Arc<dyn ScannedExcerptSource>>,
mb_registry: MultibufferRegistryHandle,
events: Option<Arc<EventBus>>,
services: Option<Arc<ServiceRegistry>>,
)Expand description
Run the scan off-thread and populate view.
Shape, and why:
- The
ignore::Walkand everyread_to_stringrun underspawn_blocking. The editor actor is acurrent_threadruntime, so a baretokio::spawnwould land the whole walk on the actor thread — paramount goal #1’s forbidden pattern. - The guest
scancalls areawaited on the async runtime between those hops, because a wasmtime async call must not be made from a blocking task. - A file no source claims is never read. The extension test happens before the read, so an agenda over a Rust checkout costs a directory walk and nothing else.
- The append publishes
MultibufferExcerptsReady— the registered off-keystroke wake. Without it the rows would sit invisible until the user pressed a key, which reads as a rendering fault and is not one.
pub for the same reason search::spawn_scan_task is: OM.A3’s gr
handler respawns without going back through the trigger, and the
throughput bench drives it without an activator.