Skip to content

Commit e49d590

Browse files
Merge pull request #45921 from dotnet/main
Merge main into live
2 parents a5a7a0c + a14f481 commit e49d590

File tree

6 files changed

+59
-25
lines changed

6 files changed

+59
-25
lines changed

docs/azure/includes/dotnet-all.md

Lines changed: 15 additions & 10 deletions
Large diffs are not rendered by default.

docs/azure/includes/dotnet-new.md

Lines changed: 15 additions & 10 deletions
Large diffs are not rendered by default.

docs/core/rid-catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The above RID specifies that `osx-x64` imports `unix-x64`. So, when NuGet restor
5656
The following example shows a slightly bigger RID graph also defined in the *runtime.json* file:
5757

5858
```
59-
linux-arm64 linux-arm32
59+
linux-arm64 linux-x64
6060
| \ / |
6161
| linux |
6262
| | |

docs/csharp/whats-new/csharp-14.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static class Enumerable
3939
// Extension property:
4040
public bool IsEmpty => source.Any() == false;
4141
// Extension indexer:
42-
public int this[int index] => source.Skip(index).First();
42+
public TSource this[int index] => source.Skip(index).First();
4343

4444
// Extension method:
4545
public IEnumerable<TSource> Where(Func<TSource, bool> predicate) { ... }

docs/fsharp/language-reference/task-expressions.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,28 @@ let makeTask() =
6868
makeTask() |> ValueTask<int>
6969
```
7070

71+
## `and!` bindings (starting from F# 10)
72+
73+
Within task expressions, it is possible to concurrently await for multiple asynchronous operations (`Task<'T>`, `ValueTask<'T>`, `Async<'T>` etc). Compare:
74+
75+
```fsharp
76+
// We'll wait for x to resolve and then for y to resolve. Overall execution time is sum of two execution times.
77+
let getResultsSequentially() =
78+
task {
79+
let! x = getX()
80+
let! y = getY()
81+
return x, y
82+
}
83+
84+
// x and y will be awaited concurrently. Overall execution time is the time of the slowest operation.
85+
let getResultsConcurrently() =
86+
task {
87+
let! x = getX()
88+
and! y = getY()
89+
return x, y
90+
}
91+
```
92+
7193
## Adding cancellation tokens and cancellation checks
7294

7395
Unlike F# async expressions, task expressions do not implicitly pass a cancellation token and don't implicitly perform cancellation checks. If your code requires a cancellation token, you should specify the cancellation token as a parameter. For example:

docs/standard/library-guidance/strong-naming.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ You should strong name your open-source .NET libraries if their targets include
4343
4444
✔️ CONSIDER strong naming your library's assemblies.
4545

46-
✔️ CONSIDER adding the strong naming key to your source control system.
46+
✔️ CONSIDER adding the strong naming key pair (public + private) to your source control system.
4747

48-
> A publicly available key lets developers modify and recompile your library source code with the same key.
48+
> A publicly available key pair lets developers modify and recompile your library source code with the same key.
4949
>
50-
> You shouldn't make the strong naming key public if it has been used in the past to give special permissions in [partial-trust scenarios](/previous-versions/dotnet/framework/code-access-security/using-libraries-from-partially-trusted-code). Otherwise, you might compromise existing environments.
50+
> You shouldn't make the strong naming key pair public if it has been used in the past to give special permissions in [partial-trust scenarios](/previous-versions/dotnet/framework/code-access-security/using-libraries-from-partially-trusted-code). Otherwise, you might compromise existing environments.
51+
>
52+
> If you can't check in the public + private key pair, then check in the public key and use [public signing](../../csharp/language-reference/compiler-options/security.md#publicsign) for regular builds. Public signing still allows developers to recompile and use your library in most scenarios.
5153
5254
> [!IMPORTANT]
5355
> When the identity of the publisher of the code is desired, [Authenticode](/windows-hardware/drivers/install/authenticode) and [NuGet Package Signing](/nuget/create-packages/sign-a-package) are recommended. Code Access Security (CAS) should not be used as a security mitigation.

0 commit comments

Comments
 (0)