Question about contexts in general: is there a way to "guarantee" that contexts are used correctly by whoever is consuming my context?
For example, if I call http.NewRequestWithContext(), how do I, as the caller, know that http is doing the "right thing" with that value, rather than ignoring it?
In the OP's example, intuitively it seems like an explicit Stop() function gives the caller explicit control of when to stop and that anyone implementing a Worker (if Worker were an interface) would know that the Stop() function should do cleanup.
However, if I only pass in a context when calling Run(), wouldn't it be easy for someone to ignore a deadline?