add RegisterCloser to ThreadGroup
This makes it clean and easy to close net.Conn
s and net.Listener
s during shutdown. No extra goroutines needed.
My only concern is that it's a little opaque. But I think the tradeoff is worth it.
This makes it clean and easy to close net.Conn
s and net.Listener
s during shutdown. No extra goroutines needed.
My only concern is that it's a little opaque. But I think the tradeoff is worth it.