24 #include <system_error>
42 inline void Thread::run() {
50 ExclusiveScope vScope((Mutex*)&aMutex);
51 vContinue = aFlags.aContinue;
52 vMoving = aFlags.aMoving;
56 string vPackagedState;
57 d_packState(vPackagedState);
58 if (d_sendToDestination(vPackagedState)) {
63 aExitCode = perform();
72 bool Thread::dispatch() {
76 if (!aFlags.aDispatched) {
86 while (!vDone && (10 > vAttempts)) {
90 [&](
void* xThreadPtr) {
91 ((
Thread*)xThreadPtr)->run();
96 aFlags.aDispatched =
true;
102 catch (system_error& vException) {
103 error_code vCode = vException.code();
104 if (11 == vCode.value()) {
121 if (aFlags.aDispatched) {
127 void Thread::relocate(
string pDestination) {
131 aFlags.aMoving =
true;