📄 syncutil.java
字号:
/* * @(#)SyncUtil.java 1.4 05/11/17 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package com.sun.corba.se.impl.orbutil.concurrent;import com.sun.corba.se.impl.orbutil.concurrent.Sync ;public class SyncUtil { private SyncUtil() {} /** Method to acquire a Sync without ever throwing an * InterruptedException. Useful when a mutex is being * used in place of Java synchronization. */ public static void acquire( Sync sync ) { boolean held = false ; while (!held) { try { sync.acquire() ; held = true ; } catch (InterruptedException exc) { held = false ; } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -