Copyright (c) 2012 Kevin Wellwood
All rights reserved.
This source code is distributed under the Modified BSD License. For terms and
conditions, see license.txt.
Immediately releases the lock. Only the thread that has first called
Lock should call Unlock. Raises LOCK_USE_EXCEPTION if the lock is
being used illegally.