摘要: 使用线程池需要注意的事项: 1、线程池中的所有线程都是后台线程 。 如果进程的所有前台线程都结束了,所有的后台线程就会停止。 不能把入池的线程改为前台线程 。2、不能给入池的线程设置优先级或名称。3、入池的线程只能用于时间较短的任务。 如果线程要一直运行就应使用Thread类创建一个线程。 usin 阅读全文
posted @ 2022-06-08 20:36 sbwynnss 阅读(195) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace 阅读全文
posted @ 2022-06-08 19:55 sbwynnss 阅读(41) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace 阅读全文
posted @ 2022-06-08 16:40 sbwynnss 阅读(33) 评论(0) 推荐(0) 编辑