The final aspect of [Modula-3's] Thread interface is … or computation. … A call to AlertWait behaves the same as … [unless alert-pending is true]. If you call Alert(t) when t is currently blocked on … m and then it raises the exception Alerted. … The call TestAlert atomically tests and clears the … [p. 115] Notice that if t is computing rather … responsibility to periodically call TestAlert in long-running computations. …
Google-1Google-2
Copyright clearance needed for quotation.
Additional Titles
Quote: use TestAlert during long-running computations to allow thread interruption