Java 线程库
任何人都知道一个好的 Java 线程库。唯一真正的要求是我需要修改调度程序。以后可能会有更多要求,所以定制会很好。任何有关您与他们的经历的建议或信息都会很棒。
谢谢
Anyone know of a good threading library for Java. Only real requirement for it is I need to modify the scheduler. Might have more requirements later so customization would be nice. Any advice or info on your experience with them would be great.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
查看
java.util.concurrent
包:包介绍文档。它应该有你需要的一切。Have a look at
java.util.concurrent
package: Package introduction documentation. It should have everything you need.我还建议您坚持使用 java.util.concurrent。您可以通过实现自定义
ExecutorService
来在有限范围内修改线程的执行调度方式。如果您打算认真使用并发包,我强烈推荐 Brian Goetz 的书 Java 并发实践
I would also suggest you stick with
java.util.concurrent
. You can modify how threads are scheduled for execution to a limited extend by implementing a customExecutorService
.If you're going to be doing any serious work with the concurrent package, I highly recommend Brian Goetz's book Java Concurrency in Practice.
如果
java.util.concurrent
包不能满足您的要求,Quartz是一个很棒的开源调度程序,它允许您安排重复执行的作业,以及大量高级功能,例如故障转移、负载平衡等。我已经使用它很多年并且喜欢它,但是如果java.util.concurrent
将满足您的需求,坚持下去。If the
java.util.concurrent
package does not satisfy your requirements, Quartz is a great, open source, scheduler which allows you to schedule jobs for repeated execution, along with a whole lot of advanced features like fail-over, load-balancing, etc. I've used it for years and love it, but ifjava.util.concurrent
will meet your needs, stick with that.