diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json
index 44a4cf972610a..2c23ae1b0ebf3 100644
--- a/.openpublishing.redirection.json
+++ b/.openpublishing.redirection.json
@@ -11502,8 +11502,7 @@
},
{
"source_path": "docs/standard/events/how-to-consume-events-in-a-web-forms-application.md",
- "redirect_url": "/aspnet/web-forms/overview/how-to-consume-events",
- "redirect_document_id": true
+ "redirect_url": "/aspnet/web-forms/overview/how-to-consume-events"
},
{
"source_path": "docs/standard/exceptions.md",
@@ -11610,6 +11609,11 @@
"redirect_url": "/dotnet/standard/parallel-programming/introduction-to-plinq",
"redirect_document_id": true
},
+ {
+ "source_path": "docs/standard/parallel-programming/using-tpl-with-other-asynchronous-patterns.md",
+ "redirect_url": "/dotnet/standard/parallel-programming/tpl-and-traditional-async-programming",
+ "redirect_document_id": true
+ },
{
"source_path": "docs/standard/portability-analyzer.md",
"redirect_url": "/dotnet/standard/analyzers/portability-analyzer",
diff --git a/docs/core/deploying/trim-self-contained.md b/docs/core/deploying/trim-self-contained.md
index e08a3dba83a6c..6d3d1b11ae857 100644
--- a/docs/core/deploying/trim-self-contained.md
+++ b/docs/core/deploying/trim-self-contained.md
@@ -32,6 +32,39 @@ When the code is indirectly referencing an assembly through reflection, you can
```
+### Support for SSL certificates
+
+If your app loads SSL certificates, such as in an ASP.NET Core app, you'll want to ensure that when trimming you prevent trimming assemblies that will help with loading SSL certificates.
+
+We can update our project file to include the following for ASP.NET Core 3.1:
+
+```xml
+
+ ...
+
+
+
+
+
+
+ ...
+
+```
+
+If we're using .Net 5.0, we can update our project file to include the following:
+
+```xml
+
+ ...
+
+
+
+
+
+ ...
+
+```
+
## Trim your app - CLI
Trim your application using the [dotnet publish](../tools/dotnet-publish.md) command. When you publish your app, set the following properties:
diff --git a/docs/fundamentals/toc.yml b/docs/fundamentals/toc.yml
index de6c78de9dbf8..2d80f0b837361 100644
--- a/docs/fundamentals/toc.yml
+++ b/docs/fundamentals/toc.yml
@@ -1734,10 +1734,9 @@ items:
href: ../standard/parallel-programming/how-to-specify-a-task-scheduler-in-a-dataflow-block.md
- name: "Walkthrough: Using BatchBlock and BatchedJoinBlock to Improve Efficiency"
href: ../standard/parallel-programming/walkthrough-using-batchblock-and-batchedjoinblock-to-improve-efficiency.md
- - name: Using TPL with Other Asynchronous Patterns
- href: ../standard/parallel-programming/using-tpl-with-other-asynchronous-patterns.md
+ - name: Use TPL with Other Asynchronous Patterns
items:
- - name: TPL and Traditional .NET Framework Asynchronous Programming
+ - name: TPL and Traditional .NET Asynchronous Programming
href: ../standard/parallel-programming/tpl-and-traditional-async-programming.md
- name: "How to: Wrap EAP Patterns in a Task"
href: ../standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md
diff --git a/docs/standard/parallel-programming/data-structures-for-parallel-programming.md b/docs/standard/parallel-programming/data-structures-for-parallel-programming.md
index 8275c4e6d4bc0..a62f11bb7f1b6 100644
--- a/docs/standard/parallel-programming/data-structures-for-parallel-programming.md
+++ b/docs/standard/parallel-programming/data-structures-for-parallel-programming.md
@@ -7,12 +7,13 @@ helpviewer_keywords:
ms.assetid: bdc82f2f-4754-45a1-a81e-fe2e9c30cef9
---
# Data Structures for Parallel Programming
-The .NET Framework version 4 introduces several new types that are useful in parallel programming, including a set of concurrent collection classes, lightweight synchronization primitives, and types for lazy initialization. You can use these types with any multithreaded application code, including the Task Parallel Library and PLINQ.
+
+.NET provides several types that are useful in parallel programming, including a set of concurrent collection classes, lightweight synchronization primitives, and types for lazy initialization. You can use these types with any multithreaded application code, including the Task Parallel Library and PLINQ.
## Concurrent Collection Classes
- The collection classes in the namespace provide thread-safe add and remove operations that avoid locks wherever possible and use fine-grained locking where locks are necessary. Unlike collections that were introduced in the .NET Framework versions 1.0 and 2.0, a concurrent collection class does not require user code to take any locks when it accesses items. The concurrent collection classes can significantly improve performance over types such as and (with user-implemented locking) in scenarios where multiple threads add and remove items from a collection.
+ The collection classes in the namespace provide thread-safe add and remove operations that avoid locks wherever possible and use fine-grained locking where locks are necessary. A concurrent collection class does not require user code to take any locks when it accesses items. The concurrent collection classes can significantly improve performance over types such as and (with user-implemented locking) in scenarios where multiple threads add and remove items from a collection.
- The following table lists the new concurrent collection classes:
+ The following table lists the concurrent collection classes:
|Type|Description|
|----------|-----------------|
@@ -25,9 +26,9 @@ The .NET Framework version 4 introduces several new types that are useful in par
For more information, see [Thread-Safe Collections](../collections/thread-safe/index.md).
## Synchronization Primitives
- The new synchronization primitives in the namespace enable fine-grained concurrency and faster performance by avoiding expensive locking mechanisms found in legacy multithreading code. Some of the new types, such as and have no counterparts in earlier releases of the .NET Framework.
+ The synchronization primitives in the namespace enable fine-grained concurrency and faster performance by avoiding expensive locking mechanisms found in legacy multithreading code.
- The following table lists the new synchronization types:
+ The following table lists the synchronization types:
|Type|Description|
|----------|-----------------|
diff --git a/docs/standard/parallel-programming/how-to-iterate-file-directories-with-plinq.md b/docs/standard/parallel-programming/how-to-iterate-file-directories-with-plinq.md
index 95091b84bc5a1..c889af8e090fb 100644
--- a/docs/standard/parallel-programming/how-to-iterate-file-directories-with-plinq.md
+++ b/docs/standard/parallel-programming/how-to-iterate-file-directories-with-plinq.md
@@ -29,7 +29,7 @@ The second query uses the static , be sure that you have sufficient permissions on all directories in the tree. Otherwise, an exception will be thrown and no results will be returned. When using the in a PLINQ query, it is problematic to handle I/O exceptions in a graceful way that enables you to continue iterating. If your code must handle I/O or unauthorized access exceptions, then you should consider the approach described in [How to: Iterate File Directories with the Parallel Class](how-to-iterate-file-directories-with-the-parallel-class.md).
- If I/O latency is an issue, for example with file I/O over a network, consider using one of the asynchronous I/O techniques described in [TPL and Traditional .NET Framework Asynchronous Programming](tpl-and-traditional-async-programming.md) and in this [blog post](https://devblogs.microsoft.com/pfxteam/parallel-extensions-and-io/).
+ If I/O latency is an issue, for example with file I/O over a network, consider using one of the asynchronous I/O techniques described in [TPL and Traditional .NET Asynchronous Programming](tpl-and-traditional-async-programming.md) and in this [blog post](https://devblogs.microsoft.com/pfxteam/parallel-extensions-and-io/).
## See also
diff --git a/docs/standard/parallel-programming/how-to-iterate-file-directories-with-the-parallel-class.md b/docs/standard/parallel-programming/how-to-iterate-file-directories-with-the-parallel-class.md
index faca231d68cda..d7efbb35a7929 100644
--- a/docs/standard/parallel-programming/how-to-iterate-file-directories-with-the-parallel-class.md
+++ b/docs/standard/parallel-programming/how-to-iterate-file-directories-with-the-parallel-class.md
@@ -18,7 +18,7 @@ In many cases, file iteration is an operation that can be easily parallelized. T
[!code-csharp[TPL_Parallel#08](../../../samples/snippets/csharp/VS_Snippets_Misc/tpl_parallel/cs/parallel_file.cs#08)]
[!code-vb[TPL_Parallel#08](../../../samples/snippets/visualbasic/VS_Snippets_Misc/tpl_parallel/vb/fileiteration08.vb#08)]
- In this example, the file I/O is performed synchronously. When dealing with large files or slow network connections, it might be preferable to access the files asynchronously. You can combine asynchronous I/O techniques with parallel iteration. For more information, see [TPL and Traditional .NET Framework Asynchronous Programming](tpl-and-traditional-async-programming.md).
+ In this example, the file I/O is performed synchronously. When dealing with large files or slow network connections, it might be preferable to access the files asynchronously. You can combine asynchronous I/O techniques with parallel iteration. For more information, see [TPL and Traditional .NET Asynchronous Programming](tpl-and-traditional-async-programming.md).
The example uses the local `fileCount` variable to maintain a count of the total number of files processed. Because the variable might be accessed concurrently by multiple tasks, access to it is synchronized by calling the method.
diff --git a/docs/standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md b/docs/standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md
index 8c3d35f77bb26..1d546cc091868 100644
--- a/docs/standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md
+++ b/docs/standard/parallel-programming/how-to-wrap-eap-patterns-in-a-task.md
@@ -18,4 +18,4 @@ The following example shows how to expose an arbitrary sequence of Event-Based A
## See also
-- [TPL and Traditional .NET Framework Asynchronous Programming](tpl-and-traditional-async-programming.md)
+- [TPL and Traditional .NET Asynchronous Programming](tpl-and-traditional-async-programming.md)
diff --git a/docs/standard/parallel-programming/index.md b/docs/standard/parallel-programming/index.md
index d40642479f6a5..a68a73d466da6 100644
--- a/docs/standard/parallel-programming/index.md
+++ b/docs/standard/parallel-programming/index.md
@@ -11,9 +11,9 @@ ms.assetid: 4d83c690-ad2d-489e-a2e0-b85b898a672d
Many personal computers and workstations have multiple CPU cores that enable multiple threads to be executed simultaneously. To take advantage of the hardware, you can parallelize your code to distribute work across multiple processors.
-In the past, parallelization required low-level manipulation of threads and locks. Visual Studio and the .NET Framework enhance support for parallel programming by providing a runtime, class library types, and diagnostic tools. These features, which were introduced with the .NET Framework 4, simplify parallel development. You can write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool.
+In the past, parallelization required low-level manipulation of threads and locks. Visual Studio and .NET enhance support for parallel programming by providing a runtime, class library types, and diagnostic tools. These features, which were introduced in .NET Framework 4, simplify parallel development. You can write efficient, fine-grained, and scalable parallel code in a natural idiom without having to work directly with threads or the thread pool.
-The following illustration provides a high-level overview of the parallel programming architecture in the .NET Framework:
+The following illustration provides a high-level overview of the parallel programming architecture in .NET.

diff --git a/docs/standard/parallel-programming/introduction-to-plinq.md b/docs/standard/parallel-programming/introduction-to-plinq.md
index 72aee5e8f6da4..7c860724768ba 100644
--- a/docs/standard/parallel-programming/introduction-to-plinq.md
+++ b/docs/standard/parallel-programming/introduction-to-plinq.md
@@ -103,7 +103,7 @@ The following illustration shows the difference between `foreach` and operator on the query and provide a instance as the argument. When the property on the token is set to true, PLINQ will notice it, stop processing on all threads, and throw an .
+PLINQ is integrated with the cancellation types in .NET. (For more information, see [Cancellation in Managed Threads](../threading/cancellation-in-managed-threads.md).) Therefore, unlike sequential LINQ to Objects queries, PLINQ queries can be canceled. To create a cancelable PLINQ query, use the operator on the query and provide a instance as the argument. When the property on the token is set to true, PLINQ will notice it, stop processing on all threads, and throw an .
It is possible that a PLINQ query might continue to process some elements after the cancellation token is set.
diff --git a/docs/standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism.md b/docs/standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism.md
index 2bb0bb07398a6..372522ef016c5 100644
--- a/docs/standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism.md
+++ b/docs/standard/parallel-programming/potential-pitfalls-in-data-and-task-parallelism.md
@@ -39,7 +39,7 @@ In many cases, [!NOTE]
> You can test for this yourself by inserting some calls to in your queries. Although this method is used in the documentation examples for demonstration purposes, do not use it in parallel loops unless necessary.
@@ -63,7 +63,7 @@ In many cases, may do), the call to Invoke causes a message to be submitted to the UI thread and blocks waiting for that message to be processed. Since the UI thread is blocked running the , the message can never be processed, and the UI thread deadlocks.
+ If you do run parallel loops on the UI thread, be careful to avoid updating UI controls from within the loop. Attempting to update UI controls from within a parallel loop that is executing on the UI thread can lead to state corruption, exceptions, delayed updates, and even deadlocks, depending on how the UI update is invoked. In the following example, the parallel loop blocks the UI thread on which it's executing until all iterations are complete. However, if an iteration of the loop is running on a background thread (as may do), the call to Invoke causes a message to be submitted to the UI thread and blocks waiting for that message to be processed. Since the UI thread is blocked running the , the message can never be processed, and the UI thread deadlocks.
[!code-csharp[TPL_Pitfalls#02](../../../samples/snippets/csharp/VS_Snippets_Misc/tpl_pitfalls/cs/pitfalls.cs#02)]
[!code-vb[TPL_Pitfalls#02](../../../samples/snippets/visualbasic/VS_Snippets_Misc/tpl_pitfalls/vb/pitfalls_vb.vb#02)]
diff --git a/docs/standard/parallel-programming/potential-pitfalls-with-plinq.md b/docs/standard/parallel-programming/potential-pitfalls-with-plinq.md
index f1155ef8d2663..6f459c54ea380 100644
--- a/docs/standard/parallel-programming/potential-pitfalls-with-plinq.md
+++ b/docs/standard/parallel-programming/potential-pitfalls-with-plinq.md
@@ -57,7 +57,7 @@ a.AsParallel().Where(...).OrderBy(...).Select(...).ForAll(x => fs.Write(x));
## Limit calls to thread-safe methods
-Most static methods in the .NET Framework are thread-safe and can be called from multiple threads concurrently. However, even in these cases, the synchronization involved can lead to significant slowdown in the query.
+Most static methods in .NET are thread-safe and can be called from multiple threads concurrently. However, even in these cases, the synchronization involved can lead to significant slowdown in the query.
> [!NOTE]
> You can test for this yourself by inserting some calls to in your queries. Although this method is used in the documentation examples for demonstration purposes, do not use it in PLINQ queries.
diff --git a/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/cs/asyncculture1.cs b/docs/standard/parallel-programming/snippets/cs/asyncculture1.cs
similarity index 76%
rename from samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/cs/asyncculture1.cs
rename to docs/standard/parallel-programming/snippets/cs/asyncculture1.cs
index ab30e3540948e..1880ac7cc3f95 100644
--- a/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/cs/asyncculture1.cs
+++ b/docs/standard/parallel-programming/snippets/cs/asyncculture1.cs
@@ -1,16 +1,11 @@
-//
-//
+//
using System;
using System.Globalization;
-using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
-[assembly:TargetFramework(".NETFramework,Version=v4.6")]
-
public class Example
{
-
public static void Main()
{
decimal[] values = { 163025412.32m, 18905365.59m };
@@ -70,21 +65,3 @@ public static void Main()
// Formatting using the fr-FR culture on thread 1.
// 163 025 412,32 € 18 905 365,59 €
//
-// If the TargetFrameworkAttribute statement is removed, the example
-// displays the following output:
-// The example is running on thread 1
-// The current culture is en-US
-// Changed the current culture to fr-FR.
-//
-// Executing the delegate synchronously:
-// Formatting using the fr-FR culture on thread 1.
-// 163 025 412,32 € 18 905 365,59 €
-//
-// Executing a task asynchronously:
-// Formatting using the en-US culture on thread 3.
-// $163,025,412.32 $18,905,365.59
-//
-// Executing a task synchronously:
-// Formatting using the fr-FR culture on thread 1.
-// 163 025 412,32 € 18 905 365,59 €
-//
diff --git a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/vb/asyncculture1.vb b/docs/standard/parallel-programming/snippets/vb/asyncculture1.vb
similarity index 73%
rename from samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/vb/asyncculture1.vb
rename to docs/standard/parallel-programming/snippets/vb/asyncculture1.vb
index c46a887e0c8a7..f191940b8cb28 100644
--- a/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/vb/asyncculture1.vb
+++ b/docs/standard/parallel-programming/snippets/vb/asyncculture1.vb
@@ -2,18 +2,13 @@
Option Strict On
Option Infer On
-'
'
Imports System.Globalization
-Imports System.Runtime.Versioning
Imports System.Threading
-Imports System.Threading.Tasks
-
-
Module Example
- Public Sub Main()
- Dim values() As Decimal = {163025412.32d, 18905365.59d}
+ Public Sub Main1()
+ Dim values() As Decimal = {163025412.32D, 18905365.59D}
Dim formatString As String = "C2"
Dim formatDelegate As Func(Of String) = Function()
Dim output As String = String.Format("Formatting using the {0} culture on thread {1}.",
@@ -33,9 +28,9 @@ Module Example
Console.WriteLine("The current culture is {0}",
CultureInfo.CurrentCulture.Name)
If CultureInfo.CurrentCulture.Name = "fr-FR" Then
- Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US")
+ Thread.CurrentThread.CurrentCulture = New CultureInfo("en-US")
Else
- Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR")
+ Thread.CurrentThread.CurrentCulture = New CultureInfo("fr-FR")
End If
Console.WriteLine("Changed the current culture to {0}.",
CultureInfo.CurrentCulture.Name)
@@ -56,7 +51,9 @@ Module Example
Console.WriteLine(t2.Result)
End Sub
End Module
+
' The example displays the following output:
+'
' The example is running on thread 1
' The current culture is en-US
' Changed the current culture to fr-FR.
@@ -73,21 +70,3 @@ End Module
' Formatting Imports the fr-FR culture on thread 1.
' 163 025 412,32 € 18 905 365,59 €
'
-' If the TargetFrameworkAttribute statement is removed, the example
-' displays the following output:
-' The example is running on thread 1
-' The current culture is en-US
-' Changed the current culture to fr-FR.
-'
-' Executing the delegate synchronously:
-' Formatting using the fr-FR culture on thread 1.
-' 163 025 412,32 € 18 905 365,59 €
-'
-' Executing a task asynchronously:
-' Formatting using the en-US culture on thread 3.
-' $163,025,412.32 $18,905,365.59
-'
-' Executing a task synchronously:
-' Formatting using the fr-FR culture on thread 1.
-' 163 025 412,32 € 18 905 365,59 €
-'
diff --git a/docs/standard/parallel-programming/task-based-asynchronous-programming.md b/docs/standard/parallel-programming/task-based-asynchronous-programming.md
index 24ddf059fa5d6..22572eef8b17c 100644
--- a/docs/standard/parallel-programming/task-based-asynchronous-programming.md
+++ b/docs/standard/parallel-programming/task-based-asynchronous-programming.md
@@ -22,7 +22,7 @@ The Task Parallel Library (TPL) is based on the concept of a *task*, which repre
Tasks and the framework built around them provide a rich set of APIs that support waiting, cancellation, continuations, robust exception handling, detailed status, custom scheduling, and more.
-For both of these reasons, in the .NET Framework, TPL is the preferred API for writing multi-threaded, asynchronous, and parallel code.
+For both of these reasons, TPL is the preferred API for writing multi-threaded, asynchronous, and parallel code in .NET.
## Creating and running tasks implicitly
@@ -88,39 +88,27 @@ Every task receives an integer ID that uniquely identifies it in an application
## Task creation options
-Most APIs that create tasks provide overloads that accept a parameter. By specifying one of these options, you tell the task scheduler how to schedule the task on the thread pool. The following table lists the various task creation options.
+Most APIs that create tasks provide overloads that accept a parameter. By specifying one or more of these options, you tell the task scheduler how to schedule the task on the thread pool. Options may be combined by using a bitwise **OR** operation.
-| parameter value|Description|
-|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
-||The default when no option is specified. The scheduler uses its default heuristics to schedule the task.|
-||Specifies that the task should be scheduled so that tasks created sooner will be more likely to be executed sooner, and tasks created later will be more likely to execute later.|
-||Specifies that the task represents a long-running operation.|
-||Specifies that a task should be created as an attached child of the current task, if one exists. For more information, see [Attached and Detached Child Tasks](attached-and-detached-child-tasks.md).|
-||Specifies that if an inner task specifies the `AttachedToParent` option, that task will not become an attached child task.|
-||Specifies that the task scheduler for tasks created by calling methods like or from within a particular task is the default scheduler instead of the scheduler on which this task is running.|
-
-The options may be combined by using a bitwise **OR** operation. The following example shows a task that has the and option.
+The following example shows a task that has the and options.
[!code-csharp[TPL_TaskIntro#03](../../../samples/snippets/csharp/VS_Snippets_Misc/tpl_taskintro/cs/taskintro.cs#03)]
[!code-vb[TPL_TaskIntro#03](../../../samples/snippets/visualbasic/VS_Snippets_Misc/tpl_taskintro/vb/tpl_intro.vb#03)]
## Tasks, threads, and culture
-Each thread has an associated culture and UI culture, which is defined by the and properties, respectively. A thread's culture is used in such operations as formatting, parsing, sorting, and string comparison. A thread's UI culture is used in resource lookup. Ordinarily, unless you specify a default culture for all the threads in an application domain by using the and properties, the default culture and UI culture of a thread is defined by the system culture. If you explicitly set a thread's culture and launch a new thread, the new thread does not inherit the culture of the calling thread; instead, its culture is the default system culture. The task-based programming model for apps that target versions of the .NET Framework prior to .NET Framework 4.6 adhere to this practice.
-
-> [!IMPORTANT]
-> Note that the calling thread's culture as part of a task's context applies to apps that *target* the .NET Framework 4.6, not apps that *run under* the .NET Framework 4.6. You can target a particular version of the .NET Framework when you create your project in Visual Studio by selecting that version from the dropdown list at the top of the **New Project** dialog box, or outside of Visual Studio you can use the attribute. For apps that target versions of the .NET Framework prior to the .NET Framework 4.6, or that do not target a specific version of the .NET Framework, a task's culture continues to be determined by the culture of the thread on which it runs.
+Each thread has an associated culture and UI culture, which are defined by the and properties, respectively. A thread's culture is used in such operations as formatting, parsing, sorting, and string comparison. A thread's UI culture is used in resource lookup.
-Starting with apps that target the .NET Framework 4.6, the calling thread's culture is inherited by each task, even if the task runs asynchronously on a thread pool thread.
+Unless you specify a default culture for all the threads in an application domain by using the and properties, the default culture and UI culture of a thread is defined by the system culture. If you explicitly set a thread's culture and launch a new thread, the new thread does not inherit the culture of the calling thread; instead, its culture is the default system culture. However, in task-based programming, tasks use the calling thread's culture, even if the task runs asynchronously on a different thread.
-The following example provides a simple illustration. It uses the attribute to target the .NET Framework 4.6 and changes the app's current culture to either French (France) or, if French (France) is already the current culture, English (United States). It then invokes a delegate named `formatDelegate` that returns some numbers formatted as currency values in the new culture. Note that whether the delegate as a task either synchronously or asynchronously, it returns the expected result because the culture of the calling thread is inherited by the asynchronous task.
+The following example provides a simple illustration. It changes the app's current culture to French (France) (or, if French (France) is already the current culture, to English (United States)). It then invokes a delegate named `formatDelegate` that returns some numbers formatted as currency values in the new culture. Whether the delegate is invoked by a task either synchronously or asynchronously, the task uses the culture of the calling thread.
-[!code-csharp[System.Globalization.CultureInfo.Class.Async#5](../../../samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/cs/asyncculture1.cs#5)]
-[!code-vb[System.Globalization.CultureInfo.Class.Async#5](../../../samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureinfo.class.async/vb/asyncculture1.vb#5)]
+:::code language="csharp" source="snippets/cs/asyncculture1.cs" id="1":::
-If you are using Visual Studio, you can omit the attribute and instead select the .NET Framework 4.6 as the target when you create the project in the **New Project** dialog.
+:::code language="vbnet" source="snippets/vb/asyncculture1.vb" id="1":::
-For output that reflects the behavior of apps the target versions of the .NET Framework prior to .NET Framework 4.6, remove the attribute from the source code. The output will reflect the formatting conventions of the default system culture, not the culture of the calling thread.
+> [!NOTE]
+> In versions of .NET Framework prior to .NET Framework 4.6, a task's culture is determined by the culture of the thread on which it *runs*, not the culture of the *calling thread*. For asynchronous tasks, this means the culture used by the task could be different to the calling thread's culture.
For more information on asynchronous tasks and culture, see the "Culture and asynchronous task-based operations" section in the topic.
diff --git a/docs/standard/parallel-programming/task-cancellation.md b/docs/standard/parallel-programming/task-cancellation.md
index e0d135c199cc3..66a655230e93d 100644
--- a/docs/standard/parallel-programming/task-cancellation.md
+++ b/docs/standard/parallel-programming/task-cancellation.md
@@ -11,8 +11,9 @@ helpviewer_keywords:
- "asynchronous task cancellation"
ms.assetid: 3ecf1ea9-e399-4a6a-a0d6-8475f48dcb28
---
-# Task Cancellation
-The and classes support cancellation through the use of cancellation tokens in the .NET Framework. For more information, see [Cancellation in Managed Threads](../threading/cancellation-in-managed-threads.md). In the Task classes, cancellation involves cooperation between the user delegate, which represents a cancelable operation and the code that requested the cancellation. A successful cancellation involves the requesting code calling the method, and the user delegate terminating the operation in a timely manner. You can terminate the operation by using one of these options:
+# Task cancellation
+
+The and classes support cancellation through the use of cancellation tokens. For more information, see [Cancellation in Managed Threads](../threading/cancellation-in-managed-threads.md). In the Task classes, cancellation involves cooperation between the user delegate, which represents a cancelable operation, and the code that requested the cancellation. A successful cancellation involves the requesting code calling the method and the user delegate terminating the operation in a timely manner. You can terminate the operation by using one of these options:
- By simply returning from the delegate. In many scenarios this is sufficient; however, a task instance that is canceled in this way transitions to the state, not to the state.
diff --git a/docs/standard/parallel-programming/task-parallel-library-tpl.md b/docs/standard/parallel-programming/task-parallel-library-tpl.md
index 9c147581c92c7..b74c691871a42 100644
--- a/docs/standard/parallel-programming/task-parallel-library-tpl.md
+++ b/docs/standard/parallel-programming/task-parallel-library-tpl.md
@@ -10,18 +10,18 @@ helpviewer_keywords:
ms.assetid: b8f99f43-9104-45fd-9bff-385a20488a23
---
# Task Parallel Library (TPL)
+
The Task Parallel Library (TPL) is a set of public types and APIs in the and namespaces. The purpose of the TPL is to make developers more productive by simplifying the process of adding parallelism and concurrency to applications. The TPL scales the degree of concurrency dynamically to most efficiently use all the processors that are available. In addition, the TPL handles the partitioning of the work, the scheduling of threads on the , cancellation support, state management, and other low-level details. By using TPL, you can maximize the performance of your code while focusing on the work that your program is designed to accomplish.
- Starting with .NET Framework 4, the TPL is the preferred way to write multithreaded and parallel code. However, not all code is suitable for parallelization; for example, if a loop performs only a small amount of work on each iteration, or it doesn't run for many iterations, then the overhead of parallelization can cause the code to run more slowly. Furthermore, parallelization like any multithreaded code adds complexity to your program execution. Although the TPL simplifies multithreaded scenarios, we recommend that you have a basic understanding of threading concepts, for example, locks, deadlocks, and race conditions, so that you can use the TPL effectively.
+ Starting with .NET Framework 4, the TPL is the preferred way to write multithreaded and parallel code. However, not all code is suitable for parallelization. For example, if a loop performs only a small amount of work on each iteration, or it doesn't run for many iterations, then the overhead of parallelization can cause the code to run more slowly. Furthermore, parallelization like any multithreaded code adds complexity to your program execution. Although the TPL simplifies multithreaded scenarios, we recommend that you have a basic understanding of threading concepts, for example, locks, deadlocks, and race conditions, so that you can use the TPL effectively.
-## Related Topics
+## Related articles
|Title|Description|
|-|-|
|[Data Parallelism](data-parallelism-task-parallel-library.md)|Describes how to create parallel `for` and `foreach` loops (`For` and `For Each` in Visual Basic).|
|[Task-based Asynchronous Programming](task-based-asynchronous-programming.md)|Describes how to create and run tasks implicitly by using or explicitly by using objects directly.|
-|[Dataflow](dataflow-task-parallel-library.md)|Describes how to use the dataflow components in the TPL Dataflow Library to handle multiple operations that must communicate with one another or to process data as it becomes available.|
-|[Using TPL with Other Asynchronous Patterns](using-tpl-with-other-asynchronous-patterns.md)|Describes how to use TPL with other asynchronous patterns in .NET|
+|[Dataflow](dataflow-task-parallel-library.md)|Describes how to use the dataflow components in the TPL Dataflow Library to handle multiple operations that must communicate with one another or to process data as it becomes available.|
|[Potential Pitfalls in Data and Task Parallelism](potential-pitfalls-in-data-and-task-parallelism.md)|Describes some common pitfalls and how to avoid them.|
|[Parallel LINQ (PLINQ)](introduction-to-plinq.md)|Describes how to achieve data parallelism with LINQ queries.|
|[Parallel Programming](index.md)|Top level node for .NET parallel programming.|
diff --git a/docs/standard/parallel-programming/using-tpl-with-other-asynchronous-patterns.md b/docs/standard/parallel-programming/using-tpl-with-other-asynchronous-patterns.md
deleted file mode 100644
index 3fcea422f2015..0000000000000
--- a/docs/standard/parallel-programming/using-tpl-with-other-asynchronous-patterns.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-title: "Using TPL with Other Asynchronous Patterns"
-ms.date: "03/30/2017"
-ms.technology: dotnet-standard
-helpviewer_keywords:
- - "tasks and APM"
-ms.assetid: 7add905b-ff60-4353-af79-5089038d9a08
----
-# Using TPL with Other Asynchronous Patterns
-The Task Parallel Library can be used with traditional .NET Framework asynchronous programming patterns in various ways.
-
-## In This Section
- [TPL and Traditional .NET Framework Asynchronous Programming](tpl-and-traditional-async-programming.md)
- Describes how objects may be used in conjunction with the Asynchronous Programming Model (APM) and the Event-based Asynchronous Pattern (EAP).
-
- [How to: Wrap EAP Patterns in a Task](how-to-wrap-eap-patterns-in-a-task.md)
- Shows how to use objects to encapsulate EAP patterns.
-
-## See also
-
-- [Task Parallel Library (TPL)](task-parallel-library-tpl.md)