 | JVMBridgeBaseMonitorEnter Method |
Enters the monitor associated with the underlying with this
IJVMBridgeBase Namespace: MASES.JCOBridge.C2JBridgeAssembly: C2JBridge (in C2JBridge.dll) Version: 2.6.3.250913-47278498b8c67e733ecc289138cddb5aee2e4c7e
Syntax
RemarksEach Java object has a monitor associated with it. If the current thread already owns the monitor associated with
IJVMBridgeBase, the JVM increments a counter in the monitor indicating the number of times this thread has entered the monitor.
If the monitor associated with
IJVMBridgeBase is not owned by any thread, the current thread becomes the owner of the monitor, setting the entry count of this monitor to 1.
If another thread already owns the monitor associated with obj, the current thread waits until the monitor is released, then tries again to gain ownership.
A monitor entered through a
MonitorEnter function call cannot be exited using the monitorexit Java virtual machine instruction or a synchronized method return.
A
MonitorEnter function call and a monitorenter Java virtual machine instruction may race to enter the monitor associated with the same object.
To avoid deadlocks, a monitor entered through a
MonitorEnter function call must be exited using the
MonitorExit call, unless the DetachCurrentThread call is used to implicitly release JNI monitors.
See Also