mackerelio/mackerel-agent — pull request #40 by Songmu (2014-11-24 15:48:55+00:00)
Title: graceful shutdown

Wait for termination until `postQueue` is empty up to 30 seconds.

This patch is not perfect because it doesn't care `postDelay`, but good enough for first step.