예제 #1
0
 private void process()
 {
     while (true)
     {
         if (pool_messages.Count > 0)
         {
             ConsoleMessageItem activeItem = pool_messages.Dequeue();
             Console.WriteLine("[Message:" + activeItem.Message + " ]");
             if (pool_messages.Count > 0)
             {
                 continue;
             }
         }
         Thread.Sleep(200);
     }
 }
예제 #2
0
 public void set_newMessage(ConsoleMessageItem newItem)
 {
     pool_messages.Enqueue(newItem);
 }