| JVMBridgeBaseMonitorEnter Method |
Enters the monitor associated with the underlying with this
IJVMBridgeBase Namespace: MASES.JCOBridge.C2JBridgeAssembly: C2JBridge (in C2JBridge.dll) Version: 2.5.21.241219-a6a144ea07c497c3a9a1be842408e852afb458be
Syntax Remarks Each 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