Committed by
Gerrit Code Review
Refactor: Use CompletableFuture instead of Executor#execute()
Change-Id: I97a155498e01c43d8adc83a55dbc2022732c862d
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -316,7 +316,7 @@ public class IntentManager | ... | @@ -316,7 +316,7 @@ public class IntentManager |
316 | log.trace("Execute operations: {}", operations); | 316 | log.trace("Execute operations: {}", operations); |
317 | 317 | ||
318 | // batchExecutor is single-threaded, so only one batch is in flight at a time | 318 | // batchExecutor is single-threaded, so only one batch is in flight at a time |
319 | - batchExecutor.execute(() -> { | 319 | + CompletableFuture.runAsync(() -> { |
320 | try { | 320 | try { |
321 | /* | 321 | /* |
322 | 1. wrap each intentdata in a runnable and submit | 322 | 1. wrap each intentdata in a runnable and submit |
... | @@ -350,7 +350,7 @@ public class IntentManager | ... | @@ -350,7 +350,7 @@ public class IntentManager |
350 | // batchService.removeIntentOperations(data); | 350 | // batchService.removeIntentOperations(data); |
351 | } | 351 | } |
352 | accumulator.ready(); | 352 | accumulator.ready(); |
353 | - }); | 353 | + }, batchExecutor); |
354 | } | 354 | } |
355 | } | 355 | } |
356 | 356 | ... | ... |
-
Please register or login to post a comment