摘要: static Mutex myMutex = new Mutex(); static public bool writeLine(string instr,string fileName){ myMutex.WaitOne(); .......[做文件读写就行了] myMutex.ReleaseMutex();} private System.Object lockThis = new System.Object(); lock (lockThis) { // Access thread-sensitive resources. ... 阅读全文
posted @ 2013-05-08 15:32 shineme 阅读(255) 评论(0) 推荐(0) 编辑