1. A computer-implemented method, comprising: a thread executing on a given processor; the thread reading a value from a shared memory location; the thread beginning execution of a sequence of program instructions, wherein termination of the execution of the sequence is dependent on receipt of an indication that a value has been written to the shared memory location by another thread and is not dependent on the value written to the shared memory location; a second thread, executing on a second processor, writing a value in the shared memory location; the thread receiving the indication from the second processor that a value has been written to the shared memory location; and in response to said receiving, the thread terminating the execution of the sequence of instructions.