SE450: Reentrant Locks [25/36] Previous pageContentsNext page

aLock = new ReentrantLock();
. . .
aLock.lock();
try
{
protected code
}
finally
{
aLock.unlock();
}

Previous pageContentsNext page