CPU mining is spending too much time in the work thread and not receiving restart messages. Update the code to return at log interval / 5 and only get work at the right time.