| 83 | } |
| 84 | |
| 85 | void |
| 86 | AppTLS::copyTLS(QThread* fromThread, |
| 87 | QThread* toThread) |
| 88 | { |
| 89 | if ( (fromThread == toThread) || !fromThread || !toThread ) { |
| 90 | return; |
| 91 | } |
| 92 | |
| 93 | copyAbortInfo(fromThread, toThread); |
| 94 | |
| 95 | QReadLocker k(&_objectMutex); |
| 96 | const TLSObjects& objectsCRef = _object->objects; // take a const ref, since it's a read lock |
| 97 | for (TLSObjects::const_iterator it = objectsCRef.begin(); |
| 98 | it != objectsCRef.end(); ++it) { |
| 99 | TLSHolderBaseConstPtr p = (*it).lock(); |
| 100 | if (p) { |
| 101 | p->copyTLS(fromThread, toThread); |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | void |
| 107 | AppTLS::softCopy(QThread* fromThread, |
no test coverage detected