diff options
author | Keuin <[email protected]> | 2023-10-21 02:29:16 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-10-21 02:29:16 +0800 |
commit | 6c0962d33e3c671b18d09da7770fe8df9c83c5b0 (patch) | |
tree | 9ffcc65981d386bf97588778175535f20e750e76 /src/main/java/com/keuin/blame | |
parent | 2d328cba159b13a6c00c164f590079c8a8899e6c (diff) |
replace LinkedBlockingDeque with ArrayBlockingQueue in SubmitWorker
Diffstat (limited to 'src/main/java/com/keuin/blame')
-rw-r--r-- | src/main/java/com/keuin/blame/SubmitWorker.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/keuin/blame/SubmitWorker.java b/src/main/java/com/keuin/blame/SubmitWorker.java index 5d565f7..78763a1 100644 --- a/src/main/java/com/keuin/blame/SubmitWorker.java +++ b/src/main/java/com/keuin/blame/SubmitWorker.java @@ -8,8 +8,8 @@ import com.mongodb.client.MongoClients; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoDatabase; +import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingDeque; import java.util.logging.Logger; public class SubmitWorker { @@ -17,7 +17,7 @@ public class SubmitWorker { public static final SubmitWorker INSTANCE = new SubmitWorker(); private final Logger logger = Logger.getLogger(SubmitWorker.class.getName()); - private final BlockingQueue<LogEntry> queue = new LinkedBlockingDeque<>(4096); + private final BlockingQueue<LogEntry> queue = new ArrayBlockingQueue<>(4096); private final Thread thread = new Thread(SubmitWorker.this::run); private boolean run = true; |