public class DefaultWorkerExecutorHelper extends WorkerExecutorHelper
WorkerExecutorHelper that executes
Jobs asynchronously using the Gradle Worker API| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultWorkerExecutorHelper.DefaultWorkAction |
static interface |
DefaultWorkerExecutorHelper.DefaultWorkParameters |
| Constructor and Description |
|---|
DefaultWorkerExecutorHelper(org.gradle.workers.WorkerExecutor workerExecutor)
Constructs a new executor
|
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Wait for all jobs of the current build operation to complete
|
boolean |
needsAwait()
Returns
true if WorkerExecutorHelper.await() MUST be called at the end of
the task. |
void |
submit(Job job)
Execute a job asynchronously
|
newInstance@Inject public DefaultWorkerExecutorHelper(org.gradle.workers.WorkerExecutor workerExecutor)
workerExecutor - the Gradle Worker API executorpublic void submit(Job job)
WorkerExecutorHelpersubmit in class WorkerExecutorHelperjob - the job to executepublic void await()
WorkerExecutorHelperawait in class WorkerExecutorHelperpublic boolean needsAwait()
WorkerExecutorHelpertrue if WorkerExecutorHelper.await() MUST be called at the end of
the task. This mostly applies to Gradle versions that don't have a
Worker API and therefore cannot let the task continue to run in parallel
to others.needsAwait in class WorkerExecutorHelpertrue if WorkerExecutorHelper.await() must be called