This commit is contained in:
Viktor Lofgren 2023-07-31 10:34:42 +02:00
parent 1c948eb3d8
commit 37c4cc68ed
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* becomes available to run the task. This is useful for coarse grained
* tasks where the calling thread might otherwise block for hours.
*/
// TODO: This class exists in crawler as well, should probably be broken out into a common library; use the one from crawler instead
public class DumbThreadPool {
private final List<Thread> workers = new ArrayList<>();
private final LinkedBlockingQueue<Runnable> tasks;

View File

@ -15,6 +15,7 @@ import java.util.concurrent.atomic.AtomicInteger;
* becomes available to run the task. This is useful for coarse grained
* tasks where the calling thread might otherwise block for hours.
*/
// TODO: This class exists in converter as well, should probably be broken out into a common library; use this version
public class DumbThreadPool {
private final List<Thread> workers = new ArrayList<>();
private final LinkedBlockingQueue<Task> tasks;