我在 Spring Boot 应用程序中为生成的消息的使用者使用固定的线程池。我的生产者生产(很多)比生产者能够处理消息的速度快,因此线程池的队列似乎“泛滥”。
限制队列大小的最佳方法是什么?预期的队列行为将是“如果队列已满,则移除头部并插入新的 Runnable”。是否可以像这样配置 Executors 线程池?
java queue multithreading threadpoolexecutor
我有一个带有两个泳道(客户端和服务器)的活动图。我想模拟从客户端到服务器的请求调用。
感谢您的任何提示!这是我的例子:
diagram uml model android-activity
android-activity ×1
diagram ×1
java ×1
model ×1
multithreading ×1
queue ×1
threadpoolexecutor ×1
uml ×1