All are interruptible in a way or another. At the least one of the existing answers previously presents an implementation of pause. Even your recommended implementation of rest infinity is in excess of-elaborate as slumber alone is already interruptibleStack Trade community consists of 183 Q&A communities which include Stack Overflow, the largest,