Logo Search packages:      
Sourcecode: poco version File versions  Download package

void Poco::NotificationQueue::enqueueUrgentNotification ( Notification pNotification  ) 

Enqueues the given notification by adding it to the end of the queue (FIFO). The queue takes ownership of the notification, thus a call like notificationQueue.enqueueNotification(new MyNotification); does not result in a memory leak.

Definition at line 75 of file NotificationQueue.cpp.

{
      poco_check_ptr (pNotification);
      FastMutex::ScopedLock lock(_mutex);
      if (_waitQueue.empty())
      {
            _nfQueue.push_front(pNotification);
      }
      else
      {
            WaitInfo* pWI = _waitQueue.front();
            _waitQueue.pop_front();
            pWI->pNf = pNotification;
            pWI->nfAvailable.set();
      }     
}


Generated by  Doxygen 1.6.0   Back to index