@markharwood I looked at this class for a while and I personally think we should refactor it to use ThreadLocal storage. Mainly I think this class is way too compliacted and involves a lot of wait() and  notify() calls that I would really want to prevent. I think we can in an efficient way. To me this looks pretty much like this:

*  a thread calls start() and we register itself in a `ThreadLocal` as a `ThreadTimeoutState`
  *  the `ThreadTimeoutState` is also passed to a Queue that is consumed by your timeout thread - form here on everything is non-blocking and single threaded which is great!
* each time a new IndexInput is created and we wrap it get a `ThreadTimeoutState` from the `ActivityTimeMonitor`
  * on each call in the IndexInput instead of going back to the `ActivityTimeMonitor` we just call `ThreadTimeoutState#checkIfTimedOut()` this method uses an internal boolean that is in-turn volatile and is set by your timeout thread. The nice part about this is that we really have everything thread local and only share an indirection between the timeout thread and actual thread that times out. All you need to make sure it that infromation like the error message or asuch is pushed to the `ThreadTimeoutState` and not pulled from `ActivityTimeMonitor`

does this make sense?