Skip to content

Commit

Permalink
fillGapRunnable
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed Jan 16, 2024
1 parent 195ea52 commit 36629cc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,8 @@ void populate(
if (gaps.isEmpty() == false) {
final var cacheFileRegion = CacheFileRegion.this;
for (SparseFileTracker.Gap gap : gaps) {
var fillGap = fillGap(cacheFileRegion, writer, gap);
executor.execute(ActionRunnable.run(refs.acquire(), fillGap::run));
var fillGapRunnable = fillGapRunnable(cacheFileRegion, writer, gap);
executor.execute(ActionRunnable.run(refs.acquire(), fillGapRunnable::run));
}
}
}
Expand Down Expand Up @@ -815,15 +815,15 @@ void populateAndRead(
if (gaps.isEmpty() == false) {
final var cacheFileRegion = CacheFileRegion.this;
for (SparseFileTracker.Gap gap : gaps) {
executor.execute(fillGap(cacheFileRegion, writer, gap));
executor.execute(fillGapRunnable(cacheFileRegion, writer, gap));
}
}
} catch (Exception e) {
releaseAndFail(listener, resource, e);
}
}

private AbstractRunnable fillGap(CacheFileRegion cacheFileRegion, RangeMissingHandler writer, SparseFileTracker.Gap gap) {
private AbstractRunnable fillGapRunnable(CacheFileRegion cacheFileRegion, RangeMissingHandler writer, SparseFileTracker.Gap gap) {
return new AbstractRunnable() {
@Override
protected void doRun() throws Exception {
Expand Down

0 comments on commit 36629cc

Please sign in to comment.