Leave nothing behind
A downloader searches several mirrors for one usable response. Native sleeps/timers model response delays; no network I/O occurs. The supplied launch wrapper counts unfinished mirror tasks, not process-wide runtime goroutines, and the report samples it 150 ms after search returns. Keep that visible ownership accounting or an equivalent completion receipt. Medium uses short delays of at most 120 ms; its task is abandoned-send cleanup after those fetches finish. Hard includes slow cooperative fetches and an optional fourth mirror field giving its attempt budget in ms (default 1000). A failed attempt returns an empty name; it is not a usable answer. Deadline reporting allows 50 ms delivery slack. Supported response delays, deadlines and attempt budgets are integers from 0 to 1000 ms. Graded timings are separated from other replies/deadlines; expected fastest response and cleanup assume ordinary scheduling.
What needs to change
After the short modeled fetches finish, leave no mirror sender blocked on an abandoned answer. The owned-work receipt must be zero at the 150 ms report.
Reproduce
- Run the program with the sample stdin and compare the goroutines left line.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
Edit search. Each mirror’s goroutine sends its answer on answers.
The supplied active counter observes owned mirror tasks 150 ms after return, rather than process-wide runtime counts.
fetch is supplied.