/** * Get a the list of threads waiting on this lock for debugging purposes */ public final synchronized Collection<Thread> getBlockedThreadsForDebugging() { Collection<Thread> shared = this.sync.getSharedQueuedThreads(); Collection<Thread> exclusive = this.sync.getExclusiveQueuedThreads(); ArrayList<Thread> results = new ArrayList<Thread>(shared.size() + exclusive.size()); results.addAll(shared); results.addAll(exclusive); return results; }
/** * Get a the list of threads waiting on this lock for debugging purposes */ public final synchronized Collection<Thread> getBlockedThreadsForDebugging() { Collection<Thread> shared = this.sync.getSharedQueuedThreads(); Collection<Thread> exclusive = this.sync.getExclusiveQueuedThreads(); ArrayList<Thread> results = new ArrayList<Thread>(shared.size() + exclusive.size()); results.addAll(shared); results.addAll(exclusive); return results; }
/** * Get a the list of threads waiting on this lock for debugging purposes */ public final synchronized Collection<Thread> getBlockedThreadsForDebugging() { Collection<Thread> shared = this.sync.getSharedQueuedThreads(); Collection<Thread> exclusive = this.sync.getExclusiveQueuedThreads(); ArrayList<Thread> results = new ArrayList<Thread>(shared.size() + exclusive.size()); results.addAll(shared); results.addAll(exclusive); return results; }
final int state = getState(); final Object writer = this.lockOwner; final Collection<Thread> readWaiters = this.sync.getSharedQueuedThreads(); final Collection<Thread> writeWaiters = this.sync .getExclusiveQueuedThreads();
final int state = getState(); final Object writer = this.lockOwner; final Collection<Thread> readWaiters = this.sync.getSharedQueuedThreads(); final Collection<Thread> writeWaiters = this.sync .getExclusiveQueuedThreads();
final int state = getState(); final Object writer = this.lockOwner; final Collection<Thread> readWaiters = this.sync.getSharedQueuedThreads(); final Collection<Thread> writeWaiters = this.sync .getExclusiveQueuedThreads();