Skip to content

Commit

Permalink
Modify task extensions to support backgroundTask
Browse files Browse the repository at this point in the history
Modifies the extensions to TaskBuilder to extend TaskBuilderBase
instead, so they apply to both the task and backgroundTask builders.
  • Loading branch information
amongonz committed Oct 21, 2024
1 parent d2713a1 commit c6c3e98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/FSharp.Control.TaskSeq/TaskExtensions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
[<AutoOpen>]
module TaskExtensions =

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

/// Used by `For`. F# currently doesn't support `while!`, so this cannot be called directly from the task CE
/// This code is mostly a copy of TaskSeq.WhileAsync.
Expand Down
2 changes: 1 addition & 1 deletion src/FSharp.Control.TaskSeq/TaskExtensions.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace FSharp.Control
[<AutoOpen>]
module TaskExtensions =

type TaskBuilder with
type TaskBuilderBase with

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

0 comments on commit c6c3e98

Please sign in to comment.