Threading: use BlockingQueue interface internally

This makes it clear that we're not using specific features
of the `LinkedBlockingQueue` implementation class.
This commit is contained in:
Sean Gilligan 2023-05-25 09:13:32 -07:00 committed by Andreas Schildbach
parent d05d44c8c3
commit 8c3cf0acd5

View file

@ -23,6 +23,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nullable;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
@ -87,7 +88,7 @@ public class Threading {
// 10,000 pending tasks is entirely arbitrary and may or may not be appropriate for the device we're
// running on.
public static int WARNING_THRESHOLD = 10000;
private final LinkedBlockingQueue<Runnable> tasks;
private final BlockingQueue<Runnable> tasks;
public UserThread() {
super("bitcoinj user thread");