Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix(build-service): do not perform build tasks on the caller thread (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
itsaky committed Nov 9, 2023
1 parent 1387575 commit fd96d8c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,9 @@ class GradleBuildService : Service(), BuildService, IToolingApiClient,
}

private fun <T> performBuildTasks(future: CompletableFuture<T>): CompletableFuture<T> {
return CompletableFuture.runAsync(this::onPrepareBuildRequest).handle { _, _ ->
return CompletableFuture.runAsync(this::onPrepareBuildRequest).handleAsync { _, _ ->
try {
return@handle future.get()
return@handleAsync future.get()
} catch (e: Throwable) {
throw CompletionException(e)
}
Expand Down

0 comments on commit fd96d8c

Please sign in to comment.