Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用ManagedExecutorService来处理作业列表。我在主线程中处理作业并使用 ManagedExecutor 执行每个作业。将来作业大小可能会超过池大小......所以我想知道,发生这种情况时是否存在队列或引发异常?
当作业数量超过池大小时,会将项目添加到队列中。当队列已满时,将引发异常。
托管执行器服务的详细信息可以在管理控制台中的资源 -> 并发资源 -> 托管执行器服务 ->(执行器服务名称)下找到
默认托管执行器服务(其 JNDI 名称为 concurrent/__defaultManagedExecutorService)的池大小和队列大小均为Integer.MAX_SIZE2147483647。
Integer.MAX_SIZE