论坛
提问
用户
提问
×
游客
登录
注册
忘记密码?
what's the difference between Executor and ExecutorService? [closed] Executor和ExecutorService之间有什么区别?[已关闭]
论坛
what's the difference between Executor and ExecutorService? [closed] Executor和ExecutorService之间有什么区别?[已关闭]
13 浏览
2023年1月4日
匿名的
2023年1月4日
0
Comments
what's the difference between Executor and ExecutorService? [closed] Executor和ExecutorService之间有什么区别?[已关闭]
我想知道Executor和ExecutorService之间有什么区别?
任何例子都会有所帮助。
0
0
答案
活跃
已投票
最新
最老的
用户名或电子邮箱地址
密码
注册
Lost Password
使用ExecutorService的优点是什么?
异步执行和同步执行有什么区别?
ExecutorService.submit和ExecutorService.execute之间有什么区别吗?
Spring ThreadPoolTaskExecutor vs Java Executorservice cachedthreadpool [closed] Spring的ThreadPoolTaskExecutor和Java的Executorservice cachedthreadpool之间的区别是什么? [已关闭]
Java的Fork/Join与ExecutorService-何时使用哪一个?
IntentService和Service之间有什么区别?
在Java中,表达式和语句有什么区别?[已关闭]
在Java代码中,ExecutorService.submit和ExecutorService.execute之间有什么区别?
submit()方法和execute()方法在ThreadPoolExecutor中有什么区别?
Android中Looper和executor线程池的区别
在Java中,Collection和Collections之间的主要区别是什么?[已关闭]
在Java中,Future和FutureTask有什么区别?
我们什么时候应该使用Java的Thread而不是Executor?
Java Timer与ExecutorService之间的区别是什么?
SingleThreadExecutor是Java中的一个线程池,它只有一个工作线程。它适用于需要按顺序执行任务的场景,因为它保证任务按照提交的顺序执行,而不会并行执行。这个线程池适用于I/O密集型的操作,比如数据库操作或者文件读写。另一方面,普通的线程是由开发者手动创建和管理的,可以同时执行多个任务,并行执行。这种方式适用于CPU密集型的操作,比如计算和算法处理。
ExecutorService(特别是ThreadPoolExecutor)是线程安全的吗?
Executors.newSingleThreadExecutor().execute(command)和new Thread(command).start()之间的区别。
线程/进程/任务之间有什么区别?
shutdown和awaitTermination的第一个调用有什么区别?
ExecutorService的shutdown和shutdownNow之间的区别