[英]Java EE 7 - ManagedThreadFactory possible limitations
Java EE 7 offers some good multithreading tools with package javax.enterprise.concurrent
. Java EE 7提供了一些很好的带有包
javax.enterprise.concurrent
多线程工具。 Is there any limitations when using the thread of ManagedThreadFactory
? 使用
ManagedThreadFactory
线程时是否有任何限制? Can I just run this thread for infinite or will the server try to clean this up after x period of time? 我可以无限期地运行此线程,还是服务器会在x个时间段后尝试清理该线程?
I can't find much about this. 我找不到太多有关此的信息。
I have taken a look into JSR-236: https://jcp.org/en/jsr/detail?id=236 and looking into it, it seems running long processes are allowed. 我研究了JSR-236: https : //jcp.org/en/jsr/detail? id=236并对其进行了研究,看来允许运行长进程。 In the document at 3.4.1.1.3 they show an example of using a
Thread
which runs in a while
loop. 在3.4.1.1.3的文档中,它们显示了使用在
while
循环中运行的Thread
的示例。 Also 3.4.4.2.3 describes about priorities which can be used for long-running processes. 此外3.4.4.2.3介绍了有关可用于长期运行的进程的优先级。
To answer my own question, according to JSR-236 it is allowed to used it for long running processes. 为了回答我自己的问题,根据JSR-236,允许将其用于长时间运行的进程。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.