protected override void Run() { Thread.CurrentThread.Name = Name; Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; while (Running) { try { Job task = _queue.Dequeue(1); if (task == null) { continue; } try { _profile.BeginProfileOnlyEnableProfile(); _action(task); // _profile2.BeginProfileOnlyEnableProfile(); } finally { _queue.DelRef(); _profile.EndProfileOnlyEnableProfile(); // _profile2.EndProfileOnlyEnableProfile(); } _logger.Debug("end"); } catch (Exception e) { _logger.ErrorFormat("Run Error:{0}", e); } } }