Changeset 3208 in ntrip for trunk/BNC/upload
- Timestamp:
- Mar 30, 2011, 7:20:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/upload/bncuploadcaster.cpp
r3207 r3208 193 193 QMutexLocker locker(&_mutex); 194 194 _isToBeDeleted = true; 195 if (!isRunning()) { 196 delete this; 197 } 195 198 } 196 199 … … 198 201 //////////////////////////////////////////////////////////////////////////// 199 202 bncUploadCaster::~bncUploadCaster() { 203 if (isRunning()) { 204 wait(); 205 } 200 206 if (_ephMap) { 201 207 QMapIterator<QString, t_eph*> it(*_ephMap); … … 216 222 void bncUploadCaster::run() { 217 223 while (true) { 224 { 225 QMutexLocker locker(&_mutex); 226 if (_isToBeDeleted) { 227 QThread::quit(); 228 deleteLater(); 229 return; 230 } 231 } 218 232 uploadClockOrbitBias(); 219 233 msleep(10); … … 346 360 347 361 QMutexLocker locker(&_mutex); 348 349 // Safely stop and delete350 // ----------------------351 if (_isToBeDeleted) {352 QThread::quit();353 deleteLater();354 return;355 }356 362 357 363 // Prepare list of lines with satellite positions in SP3-like format
Note:
See TracChangeset
for help on using the changeset viewer.