2 * Copyright 2022 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #pragma winrt ns_prefix
23 import
"inspectable.idl";
24 import
"asyncinfo.idl";
25 import
"windowscontracts.idl";
26 import
"windows.foundation.idl";
28 namespace Windows.System.Threading
30 typedef enum WorkItemPriority WorkItemPriority
;
31 typedef enum WorkItemOptions WorkItemOptions
;
33 runtimeclass ThreadPool
;
36 contract
(Windows.Foundation.UniversalApiContract
, 1.0)
46 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
56 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
57 uuid(1d1a8b8b
-fa66
-414f
-9cbd
-b65fc99d17fa
)
59 delegate
HRESULT WorkItemHandler
([in] Windows.Foundation.IAsyncAction
*operation
);
62 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
63 exclusiveto
(Windows.System.Threading.ThreadPool
),
64 uuid(b6bf67dd
-84bd
-44f8
-ac1c
-93ebcb9dba91
)
66 interface IThreadPoolStatics
: IInspectable
68 [overload
("RunAsync")] HRESULT RunAsync
(
69 [in] Windows.System.Threading.WorkItemHandler
*handler
,
70 [out, retval] Windows.Foundation.IAsyncAction
**operation
73 [overload
("RunAsync")] HRESULT RunWithPriorityAsync
(
74 [in] Windows.System.Threading.WorkItemHandler
*handler
,
75 [in] Windows.System.Threading.WorkItemPriority priority
,
76 [out, retval] Windows.Foundation.IAsyncAction
**operation
79 [overload
("RunAsync")] HRESULT RunWithPriorityAndOptionsAsync
(
80 [in] Windows.System.Threading.WorkItemHandler
*handler
,
81 [in] Windows.System.Threading.WorkItemPriority priority
,
82 [in] Windows.System.Threading.WorkItemOptions options
,
83 [out, retval] Windows.Foundation.IAsyncAction
**operation
88 contract
(Windows.Foundation.UniversalApiContract
, 1.0),
89 marshaling_behavior
(agile
),
90 static
(Windows.System.Threading.IThreadPoolStatics
, Windows.Foundation.UniversalApiContract
, 1.0),
93 runtimeclass ThreadPool