August 1999
Intermediate to advanced
1488 pages
72h 53m
English
lock.unlock()
The unlock() method of the Lock object unlocks the code you have locked. This method returns true if the unlocking was successful and false if otherwise.
Listing 8.97 assumes there is a project object with a counter property, num. Because you only want to increment the counter with each new user request, it must be locked. Once the counter has been incremented, the project is unlocked.
<SERVER> // Create a new Lock object under the project object var project.myLock = new Lock(); // Verify the lock if(!project.myLock.isValid()){ write('There has been an error constructing your lock'); }else{ // Lock the code and increment ... |
Read now
Unlock full access