quartz/systemclock: Create the advise thread after the events it depends on.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-06-20 20:13:16 -05:00 committed by Alexandre Julliard
parent 3595c42a62
commit 2adc44df2e

View file

@ -103,9 +103,9 @@ static void notify_thread(struct system_clock *clock)
{
if (!InterlockedCompareExchange(&clock->thread_created, TRUE, FALSE))
{
clock->thread = CreateThread(NULL, 0, SystemClockAdviseThread, clock, 0, NULL);
clock->notify_event = CreateEventW(NULL, FALSE, FALSE, NULL);
clock->stop_event = CreateEventW(NULL, TRUE, FALSE, NULL);
clock->thread = CreateThread(NULL, 0, SystemClockAdviseThread, clock, 0, NULL);
}
SetEvent(clock->notify_event);
}