/** * 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; } } } }
/** * 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; } } } }
private void acquireMutex(int count) throws InterruptedException { if (remutex_ != null) remutex_.acquireAll(count); else mutex_.acquire(); }
private void acquireMutex(int count) throws InterruptedException { if (remutex_ != null) remutex_.acquireAll(count); else mutex_.acquire(); }