예제 #1
0
 //+------------------------------------------------------------------+
 //| Request notifications                                            |
 //+------------------------------------------------------------------+
 void NotifyRequest()
 {
     //--- check for available requests
     if (m_manager.RequestTotal() > 0)
     {
         //--- request exists
         if (!m_event_request.WaitOne(0))
         {
             m_event_request.Set();
         }
     }
     else
     {
         //--- requests queue is empty
         if (m_event_request.WaitOne(0))
         {
             m_event_request.Reset();
         }
     }
 }