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
+9-14Lines changed: 9 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -19,19 +19,9 @@ module ValueTaskExtensions =
19
19
20
20
moduleValueTask =
21
21
letFalse= ValueTask<bool>()
22
-
23
22
letTrue= ValueTask<bool>true
24
-
25
23
let inlinefromResult(value:'T)= ValueTask<'T> value
26
-
27
-
[<Obsolete "From version 0.4.0 onward, 'ValueTask.FromResult' is deprecated in favor of 'ValueTask.fromResult'. It will be removed in an upcoming release.">]
28
-
let inlineFromResult(value:'T)= ValueTask<'T> value
29
-
30
24
let inlineofSource taskSource version = ValueTask<bool>(taskSource, version)
31
-
32
-
[<Obsolete "From version 0.4.0 onward, 'ValueTask.ofIValueTaskSource' is deprecated in favor of 'ValueTask.ofSource'. It will be removed in an upcoming release.">]
33
-
let inlineofIValueTaskSource taskSource version = ofSource taskSource version
34
-
35
25
let inlineofTask(task:Task<'T>)= ValueTask<'T> task
36
26
37
27
let inlineignore(vtask:ValueTask<'T>)=
@@ -44,7 +34,15 @@ module ValueTask =
44
34
else
45
35
ValueTask(vtask.AsTask())
46
36
37
+
[<Obsolete "From version 0.4.0 onward, 'ValueTask.FromResult' is deprecated in favor of 'ValueTask.fromResult'. It will be removed in an upcoming release.">]
38
+
let inlineFromResult(value:'T)= ValueTask<'T> value
39
+
40
+
[<Obsolete "From version 0.4.0 onward, 'ValueTask.ofIValueTaskSource' is deprecated in favor of 'ValueTask.ofSource'. It will be removed in an upcoming release.">]
41
+
let inlineofIValueTaskSource taskSource version = ofSource taskSource version
42
+
43
+
47
44
moduleTask =
45
+
let inlinefromResult(value:'U):Task<'U>= Task.FromResult value
48
46
let inlineofAsync(async:Async<'T>)=task{return! async }
49
47
let inlineofTask(task':Task)=task{do! task' }
50
48
let inlineapply(func:_ ->_)= func >> Task.FromResult
@@ -70,12 +68,11 @@ module Task =
70
68
return! binder t
71
69
}
72
70
73
-
let inlinefromResult(value:'U):Task<'U>= Task.FromResult value
74
-
75
71
moduleAsync =
76
72
let inlineofTask(task:Task<'T>)= Async.AwaitTask task
77
73
let inlineofUnitTask(task:Task)= Async.AwaitTask task
78
74
let inlinetoTask(async:Async<'T>)=task{return! async }
75
+
let inlinebind binder (task:Async<'T>):Async<'U>= ExtraTopLevelOperators.async{return! binder task }
79
76
80
77
let inlineignore(async':Async<'T>)=async{
81
78
let!_= async'
@@ -86,5 +83,3 @@ module Async =
86
83
let!result= async
87
84
return mapper result
88
85
}
89
-
90
-
let inlinebind binder (task:Async<'T>):Async<'U>= ExtraTopLevelOperators.async{return! binder task }
0 commit comments