bad: scheduling while atomic