Call interrupt() on thread before waiting for it to finish execution