Package sun.misc

Examples of sun.misc.Unsafe.monitorExit()


        if (SAFE_JDK) {
            return performLoadClassUnchecked(className, exportsOnly, resolve);
        } else if (Thread.holdsLock(this)) {
            if (LOCKLESS) {
                final Unsafe unsafe = UnsafeHolder.UNSAFE;
                unsafe.monitorExit(this);
                try {
                    return performLoadClassChecked(className, exportsOnly, resolve);
                } finally {
                    unsafe.monitorEnter(this);
                }
View Full Code Here


        if (SAFE_JDK) {
            return performLoadClassUnchecked(className, exportsOnly, resolve);
        } else if (Thread.holdsLock(this)) {
            if (LOCKLESS) {
                final Unsafe unsafe = UnsafeHolder.UNSAFE;
                unsafe.monitorExit(this);
                try {
                    return performLoadClassChecked(className, exportsOnly, resolve);
                } finally {
                    unsafe.monitorEnter(this);
                }
View Full Code Here

              Object lock = ((EntityPlayerMP) entity).playerNetServerHandler;
              if ($.tryMonitorEnter(lock)) {
                try {
                  world.updateEntity(entity);
                } finally {
                  $.monitorExit(lock);
                }
              }
            } else {
              world.updateEntity(entity);
            }
View Full Code Here

        if (SAFE_JDK) {
            return performLoadClassUnchecked(className, exportsOnly, resolve);
        } else if (Thread.holdsLock(this)) {
            if (LOCKLESS) {
                final Unsafe unsafe = UnsafeHolder.UNSAFE;
                unsafe.monitorExit(this);
                try {
                    return performLoadClassChecked(className, exportsOnly, resolve);
                } finally {
                    unsafe.monitorEnter(this);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.