Skip to content

Commit

Permalink
StructuredConcurrencyInterruptedException
Browse files Browse the repository at this point in the history
  • Loading branch information
fluentfuture committed Dec 22, 2024
1 parent c246e06 commit 101f4b6
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.google.mu.util.concurrent;

/**
* Wraps a {@link InterruptedException}.
*
* When this exception is constructed to wrap an InterruptedException, the current thread is re-interrupted
* to maintain the interruption state.
*/
public final class StructuredConcurrencyInterruptedException extends RuntimeException {
public StructuredConcurrencyInterruptedException(InterruptedException e) {
super(e);
Thread.currentThread().interrupt();
}
}

0 comments on commit 101f4b6

Please # to comment.