Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -535,16 +535,13 @@ public Tuple2<U1, U2> execute(final BrokerPool brokerPool, final ExecutionListen
Thread.sleep(50);
}
} catch (final ExecutionException | InterruptedException e) {
// if we get to here then t1Result or t2Result has thrown an exception

// force shutdown of transaction threads

t2ExecutorService.shutdownNow();
t1ExecutorService.shutdownNow();

//TODO(AR) rather than working with exceptions, it would be better to encapsulate them in a similar way to working on an empty sequence, e.g. could use Either<L,R>???

throw e;
} finally {
// always shutdown executor services to prevent thread leaks
t1ExecutorService.shutdownNow();
t2ExecutorService.shutdownNow();
Comment thread
line-o marked this conversation as resolved.
Outdated
}
}
}
Expand Down
Loading