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:
parent
de6fce48ac
commit
3ed3e031ff
|
@ -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 );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue