Nikolay Sivov : rtworkq: Invoke cancelled waiting item with RTWQ_E_OPERATION_CANCELLED.

Alexandre Julliard julliard at winehq.org
Thu May 7 17:56:53 CDT 2020


Module: wine
Branch: master
Commit: fde3bc0677ef984076bedeab1254deb34aaf0606
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fde3bc0677ef984076bedeab1254deb34aaf0606

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu May  7 19:04:49 2020 +0300

rtworkq: Invoke cancelled waiting item with RTWQ_E_OPERATION_CANCELLED.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/rtworkq/queue.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/rtworkq/queue.c b/dlls/rtworkq/queue.c
index ce06df1c8c..07d124cfb7 100644
--- a/dlls/rtworkq/queue.c
+++ b/dlls/rtworkq/queue.c
@@ -866,7 +866,11 @@ static HRESULT queue_cancel_item(struct queue *queue, RTWQWORKITEM_KEY key)
         {
             key >>= 32;
             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);
+            }
             else if ((key & SCHEDULED_ITEM_KEY_MASK) == SCHEDULED_ITEM_KEY_MASK)
                 CloseThreadpoolTimer(item->u.timer_object);
             else




More information about the wine-cvs mailing list