previous
|
start
|
next
Synchronizing Object Access
Code that manipulates shared resource is surrounded by calls to
lock
and
unlock
:
balanceChangeLock.lock();
Code that manipulates the shared resource
balanceChangeLock.unlock();
previous
|
start
|
next