1. A computer-implemented method for implementing a safepoint for a thread, comprising: during compilation of an application to be executed by the thread: obtaining a register to be associated with the thread; inserting safepoint code into the application, wherein the safepoint code includes an indirect load from a memory location stored in the register to the register; and during execution of the application by the thread, writing a thread-specific value for the thread to the memory location stored in the register, wherein the thread-specific value corresponds to an enabled value, a triggered value, or a disabled value; wherein, when the thread-specific value corresponds to the triggered value, executing the indirect load by the thread causes a value corresponding to the triggered value to be loaded to the register, and executing the indirect load by the thread after the value corresponding to the triggered value is loaded into the register performs a memory access that causes a protection fault which causes the thread to trap.