For example, an object typically uses a 3-stage process when moving: asking the new location for permission, removing itself from the old location, and updating its location value. Since the first two messages involve other objects (which might be on other servers), there is a potential here for an object to be halfway through moving when suddenly being asked to move again. Using the lock() function allows the object to prevent the 2nd message from starting until the first is complete. The argument is a name to use for the lock. Typically the name represents the name of the method. So lock("moveto") means "don't allow another execution thread to move this object". The lock() primitive doesn't actually prevent any assignments of variables. All it does is act like a stopsign that only one execution thread can get through at a time. Any subsequent threads seeking to lock() by the same name block until the first thread is complete. Any locks placed by an execution thread which remain there after the thread terminates are removed automatically.