spartan-array/spartan — pull request #221 by rgardner (2014-11-18 20:16:46+00:00)
Title: Use atexit instead of signal handlers

I realized yesterday that instead of attaching a signal handler to manually stop the workers, we could just call shutdown `atexit`, when the main process is terminated. As you can see, this replaces 16 lines of code with only 3, while achieving the same effect.

Users can still shutdown their workers manually in an interactive python session by calling `spartan.shutdown()`, but they won't be able to use `ctl-c` (which I don't think is a huge drawback). They no longer need to though, because when Python / iPython exits, `shutdown` will be called.