Click or drag to resize

IJVMBridgeBaseMonitorEnter Method

Enters the monitor associated with the underlying with this IJVMBridgeBase

Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.2.250821-1d39389489804d6a3c7a28203f93adc3f9dc1870
Syntax
void MonitorEnter()
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