_keep_scheduling: check _terminated.is_set()

This ensures that scheduling loops terminate as soon as possible after
an interrupt is received.