ntdll: Don't force submit wait in TpSetWait if timeout is 0.

It'll be submitted eventually, no need to force it and it makes support
for WT_EXECUTEINWAITTHREAD flag harder.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-11 10:53:47 +01:00 committed by Alexandre Julliard
parent de6fce48ac
commit 3ed3e031ff
1 changed files with 0 additions and 9 deletions

View File

@ -2941,7 +2941,6 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
{
struct threadpool_object *this = impl_from_TP_WAIT( wait );
ULONGLONG timestamp = TIMEOUT_INFINITE;
BOOL submit_wait = FALSE;
TRACE( "%p %p %p\n", wait, handle, timeout );
@ -2965,11 +2964,6 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
NtQuerySystemTime( &now );
timestamp = now.QuadPart - timestamp;
}
else if (!timestamp)
{
submit_wait = TRUE;
handle = NULL;
}
}
/* Add wait object back into one of the queues. */
@ -2990,9 +2984,6 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout )
}
RtlLeaveCriticalSection( &waitqueue.cs );
if (submit_wait)
tp_object_submit( this, FALSE );
}
/***********************************************************************