| 5283 | | /* Wait for at most 5 seconds, and if that is elapsed for 100msec |
|---|
| 5284 | | * per remaining thread. Just to be on the safe side. */ |
|---|
| 5285 | | int64_t cMsElapsed = RTTimeMilliTS() - u64Start; |
|---|
| 5286 | | rc = RTThreadWait(pData->aCts[i].AsyncIOThread, |
|---|
| 5287 | | RT_MAX(5000 - cMsElapsed, 100), |
|---|
| 5288 | | NULL); |
|---|
| 5289 | | if (VBOX_FAILURE(rc) && rc != VERR_INVALID_HANDLE) |
|---|
| 5290 | | { |
|---|
| 5291 | | AssertMsg(rc == VERR_TIMEOUT && RTTimeMilliTS() - u64Start >= 5000, |
|---|
| 5292 | | ("rc=%Rrc cMsElapsed=%RI64 ms Now: %RI64 ms i=%d\n", rc, cMsElapsed, RTTimeMilliTS() - u64Start, i)); |
|---|
| 5293 | | rc2 = rc; |
|---|
| 5294 | | iFailed = i; |
|---|
| 5295 | | } |
|---|
| 5296 | | } |
|---|
| 5297 | | AssertMsgRC(rc2, ("Some of the async I/O threads are still running! (%RU64 ms) rc2=%Rrc iFailed=%d\n", |
|---|
| 5298 | | RTTimeMilliTS() - u64Start, rc2, iFailed)); |
|---|
| | 5280 | rc = RTThreadWait(pData->aCts[i].AsyncIOThread, 30000 /* 30 s*/, NULL); |
|---|
| | 5281 | AssertMsg(VBOX_SUCCESS(rc) || rc == VERR_INVALID_HANDLE, ("rc=%Rrc i=%d\n", rc, i)); |
|---|
| | 5282 | } |
|---|