: finds files in project with >1 occurrences of in them, sends results back over channel as they come in main thread : waits until background thread has found MAX+1 results, then drops channel, which causes background thread to exit : waits until background thread has found results, then drops channel, which causes background thread to exit main thread : spawns multiple other main-thread tasks to open each file & create a snapshot. : search through buffer snapshot to find all results in a buffer, sends results back over channel main thread: waits for background thread to find results in all buffers, then sends them back to the caller of the outer search_local method