//1、 public void SaveModel(testmodel msg) { ThreadPool.QueueUserWorkItem(new WaitCallback(SaveModelThread), msg); } public void SaveModelThread(testmodel msg) …… //操作内容 …… //2、错误用法XXX public void SaveModel(testmodel msg) { ThreadPool.QueueUserWorkItem((a)=>{ SaveModelThread(msg); }); }
资源:
http://www.cnblogs.com/JeffreyZhao/archive/2009/03/13/anonymous-method-false-sharing.html#!comments
时间: 2024-11-06 04:07:36