一个简单的线程池实现(java版)(转)
1 线程池代码:?
?
测试结果:
Testing ThreadPool
Creating ThreadPool
Starting a new thread
count : 0
Thread count : 1
Testrunner sleeping 5 seconds
ThreadPool : shutting down
ThreadPool : shutdown done.
Testrunner leaving?
ThreadPool.repool() : Destroying incoming thread.
ThreadPool.recycle() : done.
??