如果池类没有捕捉到它们,那么线程只会退出而线程池的大小将会永久减少一个。
If the pool class does not catch these, then the thread will simply exit and the size of the thread pool will be permanently reduced by one.
接下来,对于另一个线程池类DatamineThread,几乎复制了完全相同的结构。
Next, you almost copy the exact same structure for the next thread pool class, DatamineThread.
清单1底部的四行代码则证明无论请求ConnPool池类的一个实例多少次,它都会返回相同的对象。
The four lines of code at the bottom of Listing 1 prove that no matter how many times you ask for an instance of the ConnPool pool class, it will always return the same object.
应用推荐