Only the code that immediately follows the call, in the same function. Timers, and users’ mouse-clicks on buttons, links, etc., can still trigger other client-side functions, and they will run. Therefore, it is the responsibility of application code to disable those things before the server call, if that’s what it takes.
You can use the pattern that @divyeshlakhotia has shown.