-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
Copy pathWaitCallback.xml
83 lines (76 loc) · 5.93 KB
/
WaitCallback.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<Type Name="WaitCallback" FullName="System.Threading.WaitCallback">
<TypeSignature Language="C#" Value="public delegate void WaitCallback(object? state);" FrameworkAlternate="net-10.0;net-5.0;net-6.0;net-7.0;net-8.0;net-9.0;netcore-3.0;netcore-3.1" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed WaitCallback extends System.MulticastDelegate" />
<TypeSignature Language="DocId" Value="T:System.Threading.WaitCallback" />
<TypeSignature Language="VB.NET" Value="Public Delegate Sub WaitCallback(state As Object)" />
<TypeSignature Language="F#" Value="type WaitCallback = delegate of obj -> unit" />
<TypeSignature Language="C++ CLI" Value="public delegate void WaitCallback(System::Object ^ state);" />
<TypeSignature Language="C#" Value="public delegate void WaitCallback(object state);" FrameworkAlternate="netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1;netstandard-2.0;netstandard-2.1" />
<AssemblyInfo>
<AssemblyName>System.Threading.ThreadPool</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<TypeForwardingChain>
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Threading.ThreadPool" ToVersion="10.0.0.0" FrameworkAlternate="net-10.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Threading.ThreadPool" ToVersion="5.0.0.0" FrameworkAlternate="net-5.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Threading.ThreadPool" ToVersion="6.0.0.0" FrameworkAlternate="net-6.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Threading.ThreadPool" ToVersion="7.0.0.0" FrameworkAlternate="net-7.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Threading.ThreadPool" ToVersion="8.0.0.0" FrameworkAlternate="net-8.0" />
<TypeForwarding From="netstandard" FromVersion="2.1.0.0" To="System.Threading.ThreadPool" ToVersion="9.0.0.0" FrameworkAlternate="net-9.0" />
</TypeForwardingChain>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netframework-4.8.1">
<AttributeName Language="C#">[System.Runtime.InteropServices.ComVisible(true)]</AttributeName>
<AttributeName Language="F#">[<System.Runtime.InteropServices.ComVisible(true)>]</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="state" Type="System.Object" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="state">An object containing information to be used by the callback method.</param>
<summary>Represents a callback method to be executed by a thread pool thread.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Threading.WaitCallback> represents a callback method that you want to execute on a <xref:System.Threading.ThreadPool> thread. Create the delegate by passing your callback method to the <xref:System.Threading.WaitCallback> constructor. Your method must have the signature shown here.
Queue the method for execution by passing the <xref:System.Threading.WaitCallback> delegate to <xref:System.Threading.ThreadPool.QueueUserWorkItem%2A?displayProperty=nameWithType>. The callback method executes when a thread pool thread becomes available.
> [!NOTE]
> Visual Basic users can omit the <xref:System.Threading.WaitCallback> constructor, and simply use the `AddressOf` operator when passing the callback method to <xref:System.Threading.ThreadPool.QueueUserWorkItem%2A>. Visual Basic automatically calls the correct delegate constructor.
If you want to pass information to the callback method, create an object that contains the necessary information and pass it to the <xref:System.Threading.ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback,System.Object)> method as the second argument. Each time the callback method executes, the `state` parameter contains this object.
For examples that use the `WaitCallback` delegate, see the <xref:System.Threading.ThreadPool.QueueUserWorkItem%2A?displayProperty=nameWithType> method.
For more information about the thread pool, see [The managed thread pool](/dotnet/standard/threading/the-managed-thread-pool).
]]></format>
</remarks>
<altmember cref="T:System.Threading.ThreadPool" />
<related type="Article" href="/dotnet/standard/threading/threads-and-threading">Threads and Threading</related>
<related type="Article" href="/dotnet/standard/threading/the-managed-thread-pool">The managed thread pool</related>
</Docs>
</Type>