Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

这种写法和newFixedThreadPool有什么区别? #1

Open
ltylty opened this issue Oct 19, 2017 · 1 comment
Open

这种写法和newFixedThreadPool有什么区别? #1

ltylty opened this issue Oct 19, 2017 · 1 comment

Comments

@ltylty
Copy link

ltylty commented Oct 19, 2017

请问下,你的这种写法和Executors.newFixedThreadPool()的最终效果有什么区别。newFixedThreadPool是用一个无界队列LinkedBlockingQueue来存放需要排队的线程。你是用mTaskQueue来存放需要排队的线程。最终的效果是不是差不多的?

@THEONE10211024
Copy link
Owner

是的,差不多。建议使用JDK提供的库,我写的这个仅仅为了学习。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants