Пример #1
0
 /// <summary>
 /// Enqueue's a processable message
 /// </summary>
 /// <param name="message"></param>
 public void enqueueMessage(IProcessable message)
 {
     Logging.LogMessage("Enqueing message long running is " + message.isLongRunTask());
     if (message.isLongRunTask())
     {
         longRunningProcessing(message);
     }
     else
     {
         TaskHandeler lowestHandeler = queues[0];
         int lowestProcesTime = queues[0].procesTime;
         for (int i = 1; i < queues.Length; i++)
         {
             if (queues[i].procesTime < lowestProcesTime)
             {
                 lowestHandeler = queues[i];
                 lowestProcesTime = queues[i].procesTime;
             }
         }
         lowestHandeler.enqueueMessages(message);
     }
 }
Пример #2
0
 /// <summary>
 /// Enqueue's a processable message
 /// </summary>
 /// <param name="message"></param>
 public void enqueueMessage(IProcessable message)
 {
     Logging.LogMessage("Enqueing message long running is " + message.isLongRunTask());
     if (message.isLongRunTask())
     {
         longRunningProcessing(message);
     }
     else
     {
         TaskHandeler lowestHandeler   = queues[0];
         int          lowestProcesTime = queues[0].procesTime;
         for (int i = 1; i < queues.Length; i++)
         {
             if (queues[i].procesTime < lowestProcesTime)
             {
                 lowestHandeler   = queues[i];
                 lowestProcesTime = queues[i].procesTime;
             }
         }
         lowestHandeler.enqueueMessages(message);
     }
 }