摘要:
1 // 模拟一个处理消息队列的类 2 class MessageHandler 3 { 4 // 消息队列 5 private Queue<string> messageQue = new Queue<string>(); 6 private Thread th = null; 7 private bool can = true; 8 9 // 处理消息队列的方法10 void HandlerMessage() {11 while (can) {12 ... 阅读全文
posted @ 2013-06-17 21:55
easyfrog
阅读(1289)
评论(0)
推荐(0)
摘要:
1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Windows.Forms; 9 using System.Threading;10 11 namespace InvokeTest12 {13 public partial class Form1 : Form14 ... 阅读全文
posted @ 2013-06-17 21:53
easyfrog
阅读(3312)
评论(3)
推荐(1)
摘要:
1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading; 6 7 namespace ThreadTest 8 { 9 class Program10 {11 // 信号 12 static AutoResetEvent ar = new AutoResetEvent(false);13 14 // 一个公用的变量15 static... 阅读全文
posted @ 2013-06-17 21:49
easyfrog
阅读(402)
评论(0)
推荐(0)
浙公网安备 33010602011771号