C# 线程数据槽,ThreadStatic,ThreadLocal

public static void Main(string[] args) { //当前主线程命名槽位 var slot = Thread.AllocateDataSlot(); Thread.SetData(slot, "jack"); var t = new Thread(() => { //
posted @ 2022-04-27 18:54  JackieZhengChina  阅读(58)  评论(0编辑  收藏  举报