LMAX-Exchange/disruptor — pull request #50 by willemsst (2013-05-13 21:08:07+00:00)
Title: shutdown the disruptor gracefully in case of a fatal exception

While I was testing my code with the FatalExceptionHandler I noticed the disruptor was not shutdown. I figured out that the runtime exception was just killing the thread, but the hasBacklog() was still using the sequence of the consumer that was already killed (and never would change anymore). So I thought it might be useful adding a 'isRunning' method.

I added a test as well (failed before I added the changes).

I know the FatalExceptionHandler probably won't be used in production environments, but still, I thought this might be useful as the handler is provided in the disruptor codebase.

This is my first pull request ever, so if I should have done some stuff differently, please don't hesitate to say so.

kr,
Steven