1. A method comprising: exposing a first application programming interface that, when invoked by a first thread of a process, receives from the first thread both a target address and a current value observed by the first thread at the target address; maintaining a record of the first thread and the target address, allowing the first thread to be identified if a value at the target address is subsequently modified; and putting, in response to the first application programming interface being invoked, the first thread to sleep.