Package ai.preferred.venom
Class ThreadedWorkerManager.AbstractManagedBlockingWorker
- java.lang.Object
-
- ai.preferred.venom.ThreadedWorkerManager.AbstractManagedBlockingWorker
-
- All Implemented Interfaces:
Worker
- Enclosing class:
- ThreadedWorkerManager
public abstract static class ThreadedWorkerManager.AbstractManagedBlockingWorker extends java.lang.Object implements Worker
This abstract class exposes the methods to allow submitting tasks for multithreading and implements inline blocking method.
-
-
Constructor Summary
Constructors Constructor Description AbstractManagedBlockingWorker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
executeBlockingIO(@NotNull java.lang.Runnable task)
Performs the given task inline, and increase available threads in the pool by one for the execution of other tasks.
-
-
-
Method Detail
-
executeBlockingIO
public final void executeBlockingIO(@NotNull @NotNull java.lang.Runnable task)
Description copied from interface:Worker
Performs the given task inline, and increase available threads in the pool by one for the execution of other tasks.It is imperative to wrap all I/O tasks in this method to prevent starving other parsing tasks from threads.
- Specified by:
executeBlockingIO
in interfaceWorker
- Parameters:
task
- the I/O blocking task to execute
-
-