Yes, this is executed first time in single-threaded context in both the agent and the server. The next times it might be multi-threaded, but it doesn't matter since the flag is already set.