摘要:
> 前提:如何确保一个线程使用某些资源时,同时其他线程无法使用该资源 > 实现方式 阅读全文
posted @ 2023-06-15 17:11
libaisheng9723
阅读(6)
评论(0)
推荐(0)
摘要:
创建线程 ``` Thread t=new Thread(方法名称) t.start(); ``` 暂停线程 `Thread.Sleep(TimeSpan.FromSeconds(2));` 线程等待 `t.Join();` 中止线程 ``` t.Abort(); CancellationToken 阅读全文
posted @ 2023-06-15 08:20
libaisheng9723
阅读(15)
评论(0)
推荐(0)

浙公网安备 33010602011771号