You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/FSharp.Control.TaskSeq/Utils.fs
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,15 @@
1
1
namespaceFSharp.Control
2
2
3
-
openSystem.Threading.Tasks
4
3
openSystem
4
+
openSystem.Threading.Tasks
5
5
6
6
[<AutoOpen>]
7
7
moduleValueTaskExtensions =
8
-
/// Extensions for ValueTask that are not available in NetStandard 2.1, but are
9
-
/// available in .NET 5+. We put them in Extension space to mimic the behavior of NetStandard 2.1
10
8
typeValueTaskwith
11
-
12
-
/// (Extension member) Gets a task that has already completed successfully.
13
9
static member inlineCompletedTask=
14
-
// This mimics how it is done in .NET itself
10
+
// This mimics how it is done in net5.0 and later internally
15
11
Unchecked.defaultof<ValueTask>
16
12
17
-
18
13
moduleValueTask =
19
14
letFalse= ValueTask<bool>()
20
15
letTrue= ValueTask<bool>true
@@ -38,7 +33,6 @@ module ValueTask =
38
33
[<Obsolete "From version 0.4.0 onward, 'ValueTask.ofIValueTaskSource' is deprecated in favor of 'ValueTask.ofSource'. It will be removed in an upcoming release.">]
39
34
let inlineofIValueTaskSource taskSource version = ofSource taskSource version
40
35
41
-
42
36
moduleTask =
43
37
let inlinefromResult(value:'U):Task<'U>= Task.FromResult value
44
38
let inlineofAsync(async:Async<'T>)=task{return! async }
0 commit comments