diff --git a/src/main/java/me/braydon/feather/FeatherSettings.java b/src/main/java/me/braydon/feather/FeatherSettings.java new file mode 100644 index 0000000..25b1d26 --- /dev/null +++ b/src/main/java/me/braydon/feather/FeatherSettings.java @@ -0,0 +1,16 @@ +package me.braydon.feather; + +import lombok.Getter; +import lombok.Setter; + +/** + * Settings for feather, modify these as you wish! + * + * @author Braydon + */ +public final class FeatherSettings { + /** + * The amount of threads to use for {@link FeatherThreads}. + */ + @Setter @Getter private static int threadCount = 4; +} \ No newline at end of file diff --git a/src/main/java/me/braydon/feather/FeatherThreads.java b/src/main/java/me/braydon/feather/FeatherThreads.java index 85a35f7..7d3cbe0 100644 --- a/src/main/java/me/braydon/feather/FeatherThreads.java +++ b/src/main/java/me/braydon/feather/FeatherThreads.java @@ -14,7 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger; */ public final class FeatherThreads { private static final AtomicInteger ID = new AtomicInteger(0); // The thread id - public static final ExecutorService THREAD_POOL = Executors.newFixedThreadPool(4, new ThreadFactoryBuilder() + public static final ExecutorService THREAD_POOL = Executors.newFixedThreadPool(FeatherSettings.getThreadCount(), new ThreadFactoryBuilder() .setNameFormat("Feather Thread #" + (ID.incrementAndGet())) .build()); // The thread pool to execute on } \ No newline at end of file