Changeset 10218


Ignore:
Timestamp:
Mar 3, 2011, 12:45:37 PM (9 years ago)
Author:
tbretz
Message:
Replaced deque by queue
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/StateMachineImp.cc

    r10183 r10218  
    144144    // queue is empty
    145145    if (fEventQueue.size())
    146         for (Event *q=fEventQueue.front(); q; fEventQueue.pop_front())
     146        for (Event *q=fEventQueue.front(); q; fEventQueue.pop())
    147147            delete q;
    148148}
     
    162162{
    163163    fMutex.lock();
    164     fEventQueue.push_back(cmd);
     164    fEventQueue.push(cmd);
    165165    fMutex.unlock();
    166166}
     
    182182    // and remove event from the stack
    183183    Event *cmd = fEventQueue.front();
    184     fEventQueue.pop_front();
     184    fEventQueue.pop();
    185185
    186186    fMutex.unlock();
  • trunk/FACT++/src/StateMachineImp.h

    r10183 r10218  
    33
    44#include <map>
    5 #include <deque>
     5#include <queue>
    66#include <mutex>
    77#include <vector>
     
    3535
    3636    std::vector<EventImp*> fListOfEvents; /// List of available commands as setup by user
    37     std::deque<Event*>     fEventQueue;   /// Event queue (fifo) for the received commands
     37    std::queue<Event*>     fEventQueue;   /// Event queue (fifo) for the received commands
    3838
    3939    std::mutex fMutex;   /// Mutex to ensure thread-safe access to the command fifo
Note: See TracChangeset for help on using the changeset viewer.