Skip to content

Commit 009cc85

Browse files
Update ThreadLocal`1.xml (#9815)
1 parent b3dde46 commit 009cc85

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

xml/System.Threading/ThreadLocal`1.xml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -625,15 +625,17 @@
625625
<value>Returns an instance of the object that this ThreadLocal is responsible for initializing.</value>
626626
<remarks>
627627
<format type="text/markdown"><![CDATA[
628-
628+
629629
## Remarks
630-
If this instance was not previously initialized for the current thread, accessing <xref:System.Threading.ThreadLocal%601.Value%2A> will attempt to initialize it. If an initialization function was supplied during the construction, that initialization will happen by invoking the function to retrieve the initial value for <xref:System.Threading.ThreadLocal%601.Value%2A>. Otherwise, the default value of `T` will be used.
631-
630+
If this instance was not previously initialized for the current thread, accessing <xref:System.Threading.ThreadLocal%601.Value%2A> will initialize it.
631+
If a value factory was supplied during the construction, initialization will happen by invoking the function to retrieve the initial value for <xref:System.Threading.ThreadLocal%601.Value%2A>.
632+
Otherwise, the default value of `T` will be used.
633+
Regardless of the initialization method, <xref:System.Threading.ThreadLocal%601.IsValueCreated%2A> will be set to `true`.
634+
632635
]]></format>
633636
</remarks>
634637
<exception cref="T:System.ObjectDisposedException">The <see cref="T:System.Threading.ThreadLocal`1" /> instance has been disposed.</exception>
635638
<exception cref="T:System.InvalidOperationException">The initialization function attempted to reference <see cref="P:System.Threading.ThreadLocal`1.Value" /> recursively.</exception>
636-
<exception cref="T:System.MissingMemberException">No parameterless constructor is provided and no value factory is supplied.</exception>
637639
<altmember cref="T:System.Lazy`1" />
638640
<related type="Article" href="/dotnet/framework/performance/lazy-initialization">Lazy Initialization</related>
639641
<related type="Article" href="/dotnet/framework/performance/how-to-perform-lazy-initialization-of-objects">How to: Perform Lazy Initialization of Objects</related>

0 commit comments

Comments
 (0)