newSingleThreadExecutor是用来创建一个单线程的线程池,这种情况下只有一个线程在工作。如果这个线程由于各种原因结束,则会创建一个新的线程来代替他。当任务提交时会按顺序插入任务队列,执行时从队列头部取出任务执行,保证了所有任务的执行顺序按照提交顺序来执行
wongkyunban/newSingleThreadExecutorDemo
master
Name already in use
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
About
newSingleThreadExecutor是用来创建一个单线程的线程池,这种情况下只有一个线程在工作。如果这个线程由于各种原因结束,则会创建一个新的线程来代替他。当任务提交时会按顺序插入任务队列,执行时从队列头部取出任务执行,保证了所有任务的执行顺序按照提交顺序来执行