Revert "Revert "Added timeout for waiting active destop result #4723""
This reverts commit 0f8a5687719605af59d901f08dfbb5dde74a7dc9.
This commit is contained in:
parent
eb36db6c26
commit
5fae9efe78
|
@ -37,6 +37,7 @@
|
|||
#include <UserEnv.h>
|
||||
#include <Shellapi.h>
|
||||
|
||||
#define MAXIMUM_WAIT_TIME 3
|
||||
enum {
|
||||
kOutputBufferSize = 4096
|
||||
};
|
||||
|
@ -549,8 +550,13 @@ MSWindowsWatchdog::getActiveDesktop(LPSECURITY_ATTRIBUTES security)
|
|||
}
|
||||
|
||||
ARCH->lockMutex(m_mutex);
|
||||
int waitTime = 0;
|
||||
while (!m_ready) {
|
||||
break;
|
||||
}
|
||||
|
||||
ARCH->waitCondVar(m_condVar, m_mutex, 1.0);
|
||||
i++;
|
||||
}
|
||||
m_ready = false;
|
||||
ARCH->unlockMutex(m_mutex);
|
||||
|
|
Loading…
Reference in New Issue