Commit 14435a6d authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

quartz: Reset the advise thread's timeout on each iteration.

Fixes a regression introduced by 63a6b308. Because the timeout value was always shrinked, it quickly went to 0 and then the entire advise thread used 100% of a CPU core in applications such as Media Player Classic by basically becoming a busy loop. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 3772c620
......@@ -126,13 +126,14 @@ static DWORD WINAPI SystemClockAdviseThread(void *param)
struct system_clock *clock = param;
struct advise_sink *sink, *cursor;
REFERENCE_TIME current_time;
DWORD timeout = INFINITE;
HANDLE handles[2] = {clock->stop_event, clock->notify_event};
TRACE("Starting advise thread for clock %p.\n", clock);
for (;;)
{
DWORD timeout = INFINITE;
EnterCriticalSection(&clock->cs);
current_time = GetTickCount64() * 10000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment