http://msdn.microsoft.com/zh-cn/library/c5kehkcz(VS.80).aspxhttp://blog.joycode.com/lostinet/archive/2004/05/21/22123.joyLOCK用法不对
Object thisLock = new Object();
public void AddListenTask(int chnl)
  {
  try
  {
  listentask = new IModule.Task();
  listentask.Channel = chnl;
  listentask.Position = -1;
  listentask.Record = null;
  //Listen(listentask.Channel);
  lock (thisLock)
  {
  this.TaskQueue.Enqueue(listentask);
  //return 1;
  }
  }
  catch (Exception ex)
  {
  MDRCommon.Logger.GetLogger().Error(ex.Message);
  MDRCommon.Logger.GetLogger().Error(ex.StackTrace);
  MDRCommon.Logger.GetLogger().Error(ex.Source);
  //return 0;
  }
  }