I think it's worth doing some performance tests before this patch is merged. I don't want to have the Thread.interrupted() check impact much, if possible.

Maybe? I can line those up if you think it's worth doing.