Skip to content

Commit

Permalink
Use Phaser in onRegionError
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesconnell committed Sep 2, 2024
1 parent 82cef8b commit 5573a60
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,14 @@ public void onRegionComplete(RegionInfo region, R resp) {

@Override
public void onRegionError(RegionInfo region, Throwable error) {
pool.execute(context.wrap(() -> callback.onRegionError(region, error)));
regionCompletesInProgress.register();
pool.execute(context.wrap(() -> {
try {
callback.onRegionError(region, error);
} finally {
regionCompletesInProgress.arriveAndDeregister();
}
}));
}

@Override
Expand Down

0 comments on commit 5573a60

Please sign in to comment.