Feature/graceful quit

Wait for termination until postQueue is empty up to 30 seconds.
I prefer struct initializer for clarity (and omit the default zero value of int)