rtworkq: Invoke cancelled waiting item with RTWQ_E_OPERATION_CANCELLED.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-05-07 19:04:49 +03:00 committed by Alexandre Julliard
parent 7e0e556726
commit fde3bc0677
1 changed files with 4 additions and 0 deletions

View File

@ -866,7 +866,11 @@ static HRESULT queue_cancel_item(struct queue *queue, RTWQWORKITEM_KEY key)
{ {
key >>= 32; key >>= 32;
if ((key & WAIT_ITEM_KEY_MASK) == WAIT_ITEM_KEY_MASK) if ((key & WAIT_ITEM_KEY_MASK) == WAIT_ITEM_KEY_MASK)
{
IRtwqAsyncResult_SetStatus(item->result, RTWQ_E_OPERATION_CANCELLED);
invoke_async_callback(item->result);
CloseThreadpoolWait(item->u.wait_object); CloseThreadpoolWait(item->u.wait_object);
}
else if ((key & SCHEDULED_ITEM_KEY_MASK) == SCHEDULED_ITEM_KEY_MASK) else if ((key & SCHEDULED_ITEM_KEY_MASK) == SCHEDULED_ITEM_KEY_MASK)
CloseThreadpoolTimer(item->u.timer_object); CloseThreadpoolTimer(item->u.timer_object);
else else