Skip to content

Commit c6c3e98

Browse files
committed
Modify task extensions to support backgroundTask
Modifies the extensions to TaskBuilder to extend TaskBuilderBase instead, so they apply to both the task and backgroundTask builders.
1 parent d2713a1 commit c6c3e98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/FSharp.Control.TaskSeq/TaskExtensions.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
1414
[<AutoOpen>]
1515
module TaskExtensions =
1616

17-
// Add asynchronous for loop to the 'task' computation builder
18-
type Microsoft.FSharp.Control.TaskBuilder with
17+
// Add asynchronous for loop to the 'task' and 'backgroundTask' computation builders
18+
type TaskBuilderBase with
1919

2020
/// Used by `For`. F# currently doesn't support `while!`, so this cannot be called directly from the task CE
2121
/// This code is mostly a copy of TaskSeq.WhileAsync.

src/FSharp.Control.TaskSeq/TaskExtensions.fsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace FSharp.Control
55
[<AutoOpen>]
66
module TaskExtensions =
77

8-
type TaskBuilder with
8+
type TaskBuilderBase with
99

1010
/// <summary>
1111
/// Inside <see cref="task" />, iterate over all values of a <see cref="taskSeq" />.

0 commit comments

Comments
 (0)