The java::unlock Command


java::unlock javaObj

The java::unlock command removes a lock placed on javaObj by the java::lock command. Multiple locks are allowed on javaObj. The java::unlock removes one lock each time it is called. If the internal rep of the Tcl variable referenced by javaObj is zero after the lock is removed, the Java object could be garbage collected. If javaObj does not have an existing lock, a Tcl error is generated.

If the java::unlock command is called with the string "all" as the argument, each object that had been locked with the java::lock command will be unlocked.

Copyright © 1997-1998 Sun Microsystems, Inc.