1. A method, comprising; detecting, by a processing thread, when the processing thread has entered a shared library; in response to the detecting, setting, in an operating system (OS), a thread flag corresponding, to the thread; detecting an OS flag, set by the OS, indicating that the OS is updating the shared library; in response to detecting the OS flag, suspending processing by the processing thread and transferring control from the thread to the OS; resuming processing by the processing thread in response to detecting that the OS has completed the updating; and executing the shared library in response to the resuming.