Skip to content

Commit 2e6a110

Browse files
committed
fix up mismatched paramrefs - System.Threading
1 parent d4efe3a commit 2e6a110

File tree

5 files changed

+399
-401
lines changed

5 files changed

+399
-401
lines changed

xml/System.Threading.Tasks/Task.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4082,7 +4082,7 @@ This method is intended for compiler use rather than use directly in code.
40824082

40834083
]]></format>
40844084
</remarks>
4085-
<exception cref="T:System.ArgumentNullException">The <paramref name="action" /> parameter was <see langword="null" />.</exception>
4085+
<exception cref="T:System.ArgumentNullException">The <paramref name="action" /> parameter is <see langword="null" />.</exception>
40864086
<exception cref="T:System.OperationCanceledException">The task has been canceled. This exception is stored into the returned task.</exception>
40874087
<exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.CancellationTokenSource" /> associated with <paramref name="cancellationToken" /> was disposed.</exception>
40884088
<related type="Article" href="/dotnet/standard/parallel-programming/exception-handling-task-parallel-library">Exception Handling (Task Parallel Library)</related>

xml/System.Threading/LazyThreadSafetyMode.xml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@
5252
<Docs>
5353
<summary>Specifies how a <see cref="T:System.Lazy`1" /> instance synchronizes access among multiple threads.</summary>
5454
<remarks>
55-
<format type="text/markdown"><![CDATA[
56-
57-
## Remarks
58-
Use this enumeration to specify the `mode` parameter of <xref:System.Lazy%601> constructors. The effects of all constructors on thread synchronization can be described in terms of this enumeration, whether or not they have `mode` parameters.
59-
60-
A <xref:System.Lazy%601> instance is initialized either by a user-specified initialization method or by the parameterless constructor for `T`. The initialization method is specified by the `valueFactory` parameter of a <xref:System.Lazy%601> constructor. The method returns an instance of `T`, which is the type that is lazily instantiated by the instance of <xref:System.Lazy%601>. If a constructor does not have a `valueFactory` parameter, the parameterless constructor for `T` is used to initialize the <xref:System.Lazy%601> instance. In either case, initialization occurs the first time you call the <xref:System.Lazy%601.Value%2A?displayProperty=nameWithType> property.
61-
62-
In addition to specifying the thread safety of a <xref:System.Lazy%601> instance, this enumeration affects exception caching. When exceptions are cached for a <xref:System.Lazy%601> instance, you get only one chance to initialize the instance. If an exception is thrown the first time you call the <xref:System.Lazy%601.Value%2A?displayProperty=nameWithType> property, that exception is cached and rethrown on all subsequent calls to the <xref:System.Lazy%601.Value%2A?displayProperty=nameWithType> property. The advantage of caching exceptions is that any two threads always get the same result, even when errors occur.
63-
64-
When you specify the PublicationOnly mode, exceptions are never cached. When you specify None or ExecutionAndPublication, caching depends on whether you specify an initialization method or allow the parameterless constructor for `T` to be used. Specifying an initialization method enables exception caching for these two modes. The initialization method can be very simple. For example, it might call the parameterless constructor for `T`: `new Lazy<Contents>(() => new Contents(), mode)` in C#, or `New Lazy(Of Contents)(Function() New Contents())` in Visual Basic. If you use a constructor that does not specify an initialization method, exceptions that are thrown by the parameterless constructor for `T` are not cached. The following table summarizes exception caching behavior.
65-
66-
|Mode|Using initialization method|Using parameterless constructor for `T`|
67-
|----------|---------------------------------|---------------------------------------|
68-
|None|Cached|Not cached|
69-
|PublicationOnly|Not cached|Not cached|
70-
|ExecutionAndPublication|Cached|Not cached|
71-
55+
<format type="text/markdown"><![CDATA[
56+
57+
## Remarks
58+
Use this enumeration to specify the `mode` parameter of <xref:System.Lazy%601> constructors. The effects of all constructors on thread synchronization can be described in terms of this enumeration, whether or not they have `mode` parameters.
59+
60+
A <xref:System.Lazy%601> instance is initialized either by a user-specified initialization method or by the parameterless constructor for `T`. The initialization method is specified by the `valueFactory` parameter of a <xref:System.Lazy%601> constructor. The method returns an instance of `T`, which is the type that is lazily instantiated by the instance of <xref:System.Lazy%601>. If a constructor does not have a `valueFactory` parameter, the parameterless constructor for `T` is used to initialize the <xref:System.Lazy%601> instance. In either case, initialization occurs the first time you call the <xref:System.Lazy%601.Value%2A?displayProperty=nameWithType> property.
61+
62+
In addition to specifying the thread safety of a <xref:System.Lazy%601> instance, this enumeration affects exception caching. When exceptions are cached for a <xref:System.Lazy%601> instance, you get only one chance to initialize the instance. If an exception is thrown the first time you call the <xref:System.Lazy%601.Value%2A?displayProperty=nameWithType> property, that exception is cached and rethrown on all subsequent calls to the <xref:System.Lazy%601.Value%2A?displayProperty=nameWithType> property. The advantage of caching exceptions is that any two threads always get the same result, even when errors occur.
63+
64+
When you specify the PublicationOnly mode, exceptions are never cached. When you specify None or ExecutionAndPublication, caching depends on whether you specify an initialization method or allow the parameterless constructor for `T` to be used. Specifying an initialization method enables exception caching for these two modes. The initialization method can be very simple. For example, it might call the parameterless constructor for `T`: `new Lazy<Contents>(() => new Contents(), mode)` in C#, or `New Lazy(Of Contents)(Function() New Contents())` in Visual Basic. If you use a constructor that does not specify an initialization method, exceptions that are thrown by the parameterless constructor for `T` are not cached. The following table summarizes exception caching behavior.
65+
66+
|Mode|Using initialization method|Using parameterless constructor for `T`|
67+
|----------|---------------------------------|---------------------------------------|
68+
|None|Cached|Not cached|
69+
|PublicationOnly|Not cached|Not cached|
70+
|ExecutionAndPublication|Cached|Not cached|
71+
7272
]]></format>
7373
</remarks>
7474
<related type="Article" href="/dotnet/framework/performance/lazy-initialization">Lazy Initialization</related>
@@ -206,7 +206,7 @@
206206
</ReturnValue>
207207
<MemberValue>1</MemberValue>
208208
<Docs>
209-
<summary>When multiple threads try to initialize a <see cref="T:System.Lazy`1" /> instance simultaneously, all threads are allowed to run the initialization method (or the parameterless constructor, if there is no initialization method). The first thread to complete initialization sets the value of the <see cref="T:System.Lazy`1" /> instance. This is referred to as `Publication` in the field names. That value is returned to any other threads that were simultaneously running the initialization method, unless the initialization method throws exceptions on those threads. Any instances of <paramref name="T" /> that were created by the competing threads are discarded. Effectively, the publication of the initialized value is thread-safe in the sense that only one of the initialized values may be published and used by all threads. If the initialization method throws an exception on any thread, the exception is propagated out of the <see cref="P:System.Lazy`1.Value" /> property on that thread. The exception is not cached. The value of the <see cref="P:System.Lazy`1.IsValueCreated" /> property remains <see langword="false" />, and subsequent calls to the <see cref="P:System.Lazy`1.Value" /> property, either by the thread where the exception was thrown or by other threads, cause the initialization method to run again. If the initialization method recursively accesses the <see cref="P:System.Lazy`1.Value" /> property of the <see cref="T:System.Lazy`1" /> instance, no exception is thrown.</summary>
209+
<summary>When multiple threads try to initialize a <see cref="T:System.Lazy`1" /> instance simultaneously, all threads are allowed to run the initialization method (or the parameterless constructor, if there is no initialization method). The first thread to complete initialization sets the value of the <see cref="T:System.Lazy`1" /> instance. This is referred to as `Publication` in the field names. That value is returned to any other threads that were simultaneously running the initialization method, unless the initialization method throws exceptions on those threads. Any instances of <paramref name="T" /> that were created by the competing threads are discarded. Effectively, the publication of the initialized value is thread-safe in the sense that only one of the initialized values can be published and used by all threads. If the initialization method throws an exception on any thread, the exception is propagated out of the <see cref="P:System.Lazy`1.Value" /> property on that thread. The exception is not cached. The value of the <see cref="P:System.Lazy`1.IsValueCreated" /> property remains <see langword="false" />, and subsequent calls to the <see cref="P:System.Lazy`1.Value" /> property, either by the thread where the exception was thrown or by other threads, cause the initialization method to run again. If the initialization method recursively accesses the <see cref="P:System.Lazy`1.Value" /> property of the <see cref="T:System.Lazy`1" /> instance, no exception is thrown.</summary>
210210
</Docs>
211211
</Member>
212212
</Members>

0 commit comments

Comments
 (0)