Multiple choice technology programming languages

What method(s) must be used with the Application object to ensure that only one process accesses a variable at a time ?

  1. Synchronize()

  2. Lock() and UnLock()

  3. Lock()

  4. Asynchroize()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The Application object stores data shared across all users/sessions. Since multiple users can access it simultaneously, you must use Lock() to prevent other processes from modifying it while you're reading/writing, then UnLock() when done. Synchronize() and Asynchroize() are not valid Application object methods. Using only Lock() without UnLock() would cause deadlocks.