An object-based locking mechanism is disclosed in which the requesting and granting
of access to data is decoupled by the use of methods to regulate the data access.
In one embodiment, a client object calls a request lock method of a server object
when it desires access to data regulated by the server object. When the server
object decides to grant access, it calls a lock granted method of the client object.
Within the scope of the lock granted method, the client object has access to the
data; when the client object returns the lock granted method, access is released.
An object queue to manage data access with respect to a number of client objects
for a server object is also disclosed.