2022年3月21日

C# 线程数据槽,ThreadStatic,ThreadLocal

摘要: public static void Main(string[] args) { //当前主线程命名槽位 var slot = Thread.AllocateDataSlot(); Thread.SetData(slot, "jack"); var t = new Thread(() => { // 阅读全文

posted @ 2022-03-21 16:21 Shine-Zhong 阅读(294) 评论(0) 推荐(1) 编辑

导航