On Fri, Oct 28, 2016 at 8:15 AM, Peter Mogensen <a...@one.com> wrote: > > The point being that it's up to the user of the interface how to specific > Server implementation should work. >
Yes, of course, but an interface with just two methods (Serve / Stop) is not enough to provide race-free semantics (unless you disallow restarting a stopped server). > As I said before... what they buy you is a way to provide the channel used > for shutdown externally, so you know exactly which invocation of Server() > you are cancelling. > But when the shutdown event is triggered externally, you need some extra > code to provide the context for the current Serve() invocation. I agree. /npat -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.