Add AtomicBoolean to stop processing loop when ShutdownHook is triggered

Still couldn't commit directly to ssc ... so I forked and you can have the pull request. ;-)