Package | Description |
---|---|
net.imglib2.loops | |
net.imglib2.parallel |
Modifier and Type | Method and Description |
---|---|
LoopBuilder<T> |
LoopBuilder.multiThreaded(TaskExecutor taskExecutor)
By default
LoopBuilder runs the loop without multi-threading. |
Modifier and Type | Class and Description |
---|---|
class |
DefaultTaskExecutor
A
TaskExecutor that wraps around a given ExecutorService . |
Modifier and Type | Method and Description |
---|---|
static TaskExecutor |
TaskExecutors.fixedThreadPool(int numThreads)
Returns a
TaskExecutor that uses a fixed thread pool with the
given number of threads. |
static TaskExecutor |
TaskExecutors.forExecutorService(ExecutorService executorService)
Creates a
TaskExecutor that wraps around given ExecutorService . |
static TaskExecutor |
TaskExecutors.forExecutorServiceAndNumTasks(ExecutorService executorService,
int numTasks)
Creates a
TaskExecutor that wraps around given ExecutorService ,
and will suggest the given number of tasks when asked. |
static TaskExecutor |
TaskExecutors.forExecutorServiceAndNumThreads(ExecutorService executorService,
int numThreads)
Creates a
TaskExecutor that wraps around given ExecutorService ,
and will return the given parallelism. |
static TaskExecutor |
Parallelization.getTaskExecutor()
Returns the
TaskExecutor that was set for this thread. |
static TaskExecutor |
TaskExecutors.multiThreaded()
TaskExecutor for multi-threaded execution. |
static TaskExecutor |
TaskExecutors.nestedFixedThreadPool(int numThreads,
int numSubThreads)
Returns a
TaskExecutor that uses a fixed thread pool with the
given number of threads. |
static TaskExecutor |
TaskExecutors.numThreads(int numThreads)
TaskExecutor that uses the given number or threads. |
static TaskExecutor |
TaskExecutors.singleThreaded()
TaskExecutor for single threaded execution. |
Modifier and Type | Method and Description |
---|---|
static <T> T |
Parallelization.runWithExecutor(TaskExecutor taskExecutor,
Callable<T> action)
Executes the given
Callable with the given TaskExecutor ,
waits for the execution to finish and returns the result. |
static void |
Parallelization.runWithExecutor(TaskExecutor taskExecutor,
Runnable action)
Executes the given
Runnable with the given TaskExecutor ,
and waits for the execution to finish. |
Modifier and Type | Method and Description |
---|---|
static ThreadFactory |
TaskExecutors.applyTaskExecutorToThreadFactory(Supplier<TaskExecutor> taskExecutorFactory,
ThreadFactory threadFactory)
Returns a
ThreadFactory . |
static ThreadFactory |
TaskExecutors.threadFactory(Supplier<TaskExecutor> taskExecutorFactory)
Returns a
ThreadFactory . |
Copyright © 2015–2022 ImgLib2. All rights reserved.