Avoid deadlock situation between onInterrupt() and unprepare()