# juc-demo **Repository Path**: ngwingbun/juc-demo ## Basic Information - **Project Name**: juc-demo - **Description**: No description available - **Primary Language**: Java - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-01-15 - **Last Updated**: 2022-01-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: Java ## README ### 这是一个Java异步案例学习的集合项目 #### 目录解释 `completablefuture` :CompletableFuture学习 #### 其他内容 因为多线程涉及到线程上下文切换的过程,切换上下文需要消耗资源; - 如果子任务是 `IO密集型` 的任务,那么可以使用多线程来执行子任务,如:发起HTTP请求、读写文件、**查询数据库**等; - 如果子任务是 `CPU密集型` 的任务,那么使用多线程只会导致速度变得更慢,如:一个for循环里面进行属性的拷贝等;