Changeset 31262 in vbox
- Timestamp:
- Jul 31, 2010 8:49:57 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64285
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
r31260 r31262 1075 1075 CHECK_ERROR_BREAK(console, PowerUp(progress.asOutParam())); 1076 1076 1077 /* wait for result because there can be errors */ 1078 /** @todo The error handling here is kind of peculiar, anyone care 1079 * to comment why this works just fine? */ 1077 /* 1078 * Wait for the result because there can be errors. 1079 * 1080 * It's vital to process events while waiting (teleportation deadlocks), 1081 * so we'll poll for the completion instead of waiting on it. 1082 */ 1080 1083 for (;;) 1081 1084 { 1082 rc = progress->WaitForCompletion(500);1083 if (FAILED(rc))1084 break;1085 1086 /* Processing events is vital for teleportation targets. */1087 gEventQ->processEventQueue(0);1088 1089 1085 BOOL fCompleted; 1090 1086 rc = progress->COMGETTER(Completed)(&fCompleted); 1091 1087 if (FAILED(rc) || fCompleted) 1092 1088 break; 1093 } 1094 1089 1090 /* Process pending events, then wait for new ones. */ 1091 gEventQ->processEventQueue(0); 1092 gEventQ->processEventQueue(500); 1093 } 1094 1095 /** @todo The error handling here is kind of peculiar, anyone care 1096 * to comment why this works just fine? (this is old the code) */ 1095 1097 if (SUCCEEDED(progress->WaitForCompletion(-1))) 1096 1098 {
Note:
See TracChangeset
for help on using the changeset viewer.