@Scheduled是单线程吗
时间: 2023-10-14 22:31:50 浏览: 86
@scheduled任务调度使用详解及@scheduled与多线程和@Async异步任务结合使用
根据引用、和的内容,我们可以得出结论,@Scheduled注解在Spring Boot中是单线程的。这意味着每次只能有一个作业在运行,并且如果上一个定时任务还没有执行完,下一个定时任务将会等待。因此,@Scheduled注解确实是单线程的。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [@Scheduled定时任务单线程和多线程](https://blog.csdn.net/wrongyao/article/details/88041172)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Spring boot 基于注解(@Scheduled)的定时任务是单线程的](https://blog.csdn.net/qq_15654285/article/details/126271950)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Spring boot+Mybatis整合实现增删改查(适合初学者入门必备也可以做脚手架开发)](https://download.csdn.net/download/weixin_43860634/87936694)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文