Contents | Prev | Next | Index

monitorexit

The monitorenter and monitorexit instructions may be used to implement Java's synchronized blocks. The monitorexit instruction is not used in the implementation of synchronized methods, although it provide equivalent semantics; monitor exit on normal or abnormal synchronized method completion is handled implicitly by the Java Virtual Machine's method invocation instructions. The Java Virtual Machine also implicitly handles monitor exit from within a synchronized block when an error is thrown. See §7.14, in "Compiling for the Java Virtual Machine," for more information on the use of the monitorenter and monitorexit instructions.


Contents | Prev | Next | Index

Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to doug.kramer@sun.com