- Timestamp:
- Apr 12, 2007 5:16:37 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/server.cpp
r1882 r2057 246 246 gEventQ->IsOnCurrentThread (&onMainThread); 247 247 248 LogFlowFunc (("Last VirtualBox instance was released, " 249 "scheduling server shutdown in %d ms...\n", 250 VBoxSVC_ShutdownDelay)); 251 252 int vrc = RTTimerStart (sTimer, uint64_t (VBoxSVC_ShutdownDelay) * 1000000); 253 AssertRC (vrc); 254 if (VBOX_FAILURE (vrc)) 248 PRBool timerStarted = PR_FALSE; 249 250 /* sTimes is null if this call originates from 251 * FactoryDestructor() */ 252 if (sTimer != NULL) 255 253 { 256 /* Failed to start the timer, post the shutdown event 257 * manually if not on the main thread alreay. */ 254 LogFlowFunc (("Last VirtualBox instance was released, " 255 "scheduling server shutdown in %d ms...\n", 256 VBoxSVC_ShutdownDelay)); 257 258 int vrc = RTTimerStart (sTimer, uint64_t (VBoxSVC_ShutdownDelay) * 1000000); 259 AssertRC (vrc); 260 timerStarted = SUCCEEDED (vrc); 261 } 262 else 263 { 264 LogFlowFunc (("Last VirtualBox instance was released " 265 "on XPCOM shutdown.\n")); 266 Assert (onMainThread); 267 } 268 269 if (!timerStarted) 270 { 258 271 if (!onMainThread) 259 272 { 273 /* Failed to start the timer, post the shutdown event 274 * manually if not on the main thread alreay. */ 260 275 ShutdownTimer (NULL, NULL); 261 276 } … … 273 288 * client was faster and requested VirtualBox again. 274 289 * 275 * In either case, since we're on the main thread already, 276 * it's necessary just to release the instance once more 277 * to call its destructor. 290 * In either case, there is nothing to do. 291 * 292 * Note: case b) is actually no more valid since we don't 293 * call Release() from DestructEventHandler() in this case 294 * any more. Thus, we assert below. 278 295 */ 279 count = VirtualBox::Release(); 296 297 Assert (gEventQ == NULL); 280 298 } 281 299 }
Note:
See TracChangeset
for help on using the changeset viewer.