/** * Acquires in shared mode, ignoring interrupts. Implemented by first invoking * at least once {@link #tryAcquireShared}, returning on success. Otherwise * the thread is queued, possibly repeatedly blocking and unblocking, invoking * {@link #tryAcquireShared} until success. * * @param arg * the acquire argument. This value is conveyed to * {@link #tryAcquireShared} but is otherwise uninterpreted and can * represent anything you like. */ public final void acquireShared(int arg, Object id) { if (tryAcquireShared(arg, id) < 0) doAcquireShared(arg, id); }