Potential hang avoided by checking for context interrupt