mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:14:12 +08:00
mdbx-test: minor refine actor_poll() for Windows.
Change-Id: Ic1d98ae9e6d8bd7534390b15682f0bc7d1e73fac
This commit is contained in:
parent
23733bf4af
commit
3ce4c3a0e4
@ -380,7 +380,7 @@ int osal_actor_poll(mdbx_pid_t &pid, unsigned timeout) {
|
||||
if (pair.second.second <= as_running)
|
||||
handles.push_back(pair.second.first);
|
||||
|
||||
loop:
|
||||
while (true) {
|
||||
DWORD rc =
|
||||
MsgWaitForMultipleObjectsEx((DWORD)handles.size(), &handles[0],
|
||||
(timeout > 60) ? 60 * 1000 : timeout * 1000,
|
||||
@ -388,11 +388,11 @@ loop:
|
||||
|
||||
if (rc == WAIT_OBJECT_0) {
|
||||
logging::progress_canary(true);
|
||||
goto loop;
|
||||
continue;
|
||||
}
|
||||
if (rc == WAIT_OBJECT_0 + 1) {
|
||||
logging::progress_canary(false);
|
||||
goto loop;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rc >= WAIT_OBJECT_0 + 2 && rc < WAIT_OBJECT_0 + handles.size()) {
|
||||
@ -412,6 +412,7 @@ loop:
|
||||
|
||||
return waitstatus2errcode(rc);
|
||||
}
|
||||
}
|
||||
|
||||
void osal_yield(void) { SwitchToThread(); }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user