the problem is the `thread.raise(LogStash::ShutdownSignal)` on the input plugin, this is not soft. execution flow is interrupted randomly and its very hard to create a rescue block that will do the right thing since this rescue is out of any context. 

we should definitely followup on this discussion but, I think we should first call `input.teardown` which delegates to the input plugin the responsibility of implementing a way of correctly doing a clean shutdown. then simply add a wait+timeout logic and if the thread has not exited within a given period, we  raise and/or kill it. this is a pattern I have implemented a few time and it works well. the only constrain is that `teardown` must be thread safe - but this can be abstracted so that plugins implementors do not have to worry about it.