- Timestamp:
- Sep 12, 2013, 5:09:02 PM (11 years ago)
- Location:
- trunk/GnssCenter/map_stations
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GnssCenter/map_stations/thriftclient.cpp
r5424 r5425 43 43 try { 44 44 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 } 46 54 transport->close(); 47 55 } -
trunk/GnssCenter/map_stations/thriftclient.h
r5424 r5425 5 5 #include <map> 6 6 #include <QThread> 7 #include <QMutex> 7 8 8 9 #include <transport/TSocket.h> … … 67 68 ~t_thriftClient(); 68 69 virtual void run(); 69 void stop() {_stop = true;} 70 void stop() { 71 QMutexLocker locker(&_mutex); 72 _stop = true; 73 } 70 74 71 75 private: 76 QMutex _mutex; 72 77 GnssCenter::t_map_stations* _parent; 73 78 bool _stop;
Note:
See TracChangeset
for help on using the changeset viewer.