Changeset 5425 in ntrip for trunk


Ignore:
Timestamp:
Sep 12, 2013, 5:09:02 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/map_stations
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/map_stations/thriftclient.cpp

    r5424 r5425  
    4343  try {
    4444    transport->open();
    45     while (!_stop && processor->process(protocol,protocol,0)) {}
     45    while (true) {
     46      {
     47        QMutexLocker locker(&_mutex);
     48        if (_stop) {
     49          break;
     50        }
     51      }
     52      processor->process(protocol,protocol,0);
     53    }
    4654    transport->close();
    4755  }
  • trunk/GnssCenter/map_stations/thriftclient.h

    r5424 r5425  
    55#include <map>
    66#include <QThread>
     7#include <QMutex>
    78
    89#include <transport/TSocket.h>
     
    6768  ~t_thriftClient();
    6869  virtual void run();
    69   void stop() {_stop = true;}
     70  void stop() {
     71    QMutexLocker locker(&_mutex);
     72    _stop = true;
     73  }
    7074
    7175 private:
     76  QMutex                      _mutex;
    7277  GnssCenter::t_map_stations* _parent;
    7378  bool                        _stop;
Note: See TracChangeset for help on using the changeset viewer.