Go-exit: An exit strategy for go routines

Hi all,

I just released go-exit. The library helps to end the go routines in your program and collects potential errors.

Feedback is very welcome.



Good job! Just a couple remarks:

  1. Oh no, another go-* name :smile:
  2. Do you plan on adding something like AtExit? I think it might fit well withing this library.

Thanks for the feedback!

  1. I guess this is controversial :wink: I kind of like this convention. On github, it’s easy visible which repository contains go code.
  2. Could tell, what you mean exactly? Do you want to register a handler that is called on exit?

Yes, I have made some basic internal package in one project were I needed some cleanup on exit (remove some UNIX sockets).

I would consider a much more robust implementation and your package is 1 cm from solving this problem.

Should not be a big change. I’ll look into this, next time I work on the lib.

Hey Giulio,

I’ve done some refactoring and added some callbacks too. See the godoc for details.


Many use context.Context for gorountine lifetime management, it is a sort of a standard. Please compare your package to context.Context

Well, lifetime management is one half. I need also to collect potential errors from the goroutines. But context.Context is a really useful library. Use it, if it solves your problem.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.