Skip to content

Commit 8df0d41

Browse files
committed
#5364 Change PlanB snapshots to prevent closure when in use
1 parent 59cdddd commit 8df0d41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stroom-util/src/main/java/stroom/util/concurrent/StripedGuard.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ public StripedGuard(final Runnable destroyRunnable, final int stripeCount) {
164164
* @return stripe index in range [0, stripeCount), guaranteed non-negative
165165
*/
166166
private int getStripeIdx() {
167-
final long tid = Thread.currentThread().threadId();
167+
final long threadId = Thread.currentThread().threadId();
168168
// XOR-fold upper and lower 32 bits for better distribution
169-
return (int) ((tid ^ (tid >>> 32)) & stripeMask);
169+
return (int) ((threadId ^ (threadId >>> 32)) & stripeMask);
170170
}
171171

172172
/**

0 commit comments

Comments
 (0)