I believe that it forces the engine to update the values stored in the global variables the server provides to you; when the scripting engine is running a function, the values don't change inside the scripting engine even if they change in the servers real copy. So for instance, an infinite loop that accesses global variables will always get the same data every loop iteration; this forces it to reload the current data.
Most useful in an infinitely running thread, which as you know is quite buggy.