-
-
Notifications
You must be signed in to change notification settings - Fork 653
Open
Labels
Milestone
Description
It is a deliberate design decision that Try handles InterruptedException as Fata, read: rethrowing it. See also this thread. This is essential, Try must not swallow InterruptedException:
// should not throw
var f1 = Future.of(() -> { throw new InterruptedException(); })
var f2 = Future.of(() -> Try.of(() -> { throw new InterruptedException(); }))
// should throw InterruptedException instead of blocking forever
f1.await();
f2.await();However, currently Future.await() is misbehaving, it does not recognize that the above examples have been interrupted.