-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native Tasks for TaskResult, TaskOption, and TaskResultOption. #169
Conversation
1817967
to
4e2a872
Compare
4e2a872
to
9cd725b
Compare
Adds tests for backgroundTaskResultCE. Adds a Ply compatible version
33d98b5
to
0b34e81
Compare
While I haven't figured out the best way yet to test the Dynamic path, i'm going to merge this to get feedback from people in the field. |
- [Moves many functions to inline with InlineIfLambda for performance](#166) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Native Tasks for TaskResult, TaskOption, and TaskResultOption](#169) Credits [@TheAngryByrd](https://github.com/TheAngryByrd)
- [Moves many functions to inline with InlineIfLambda for performance](#166) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Native Tasks for TaskResult, TaskOption, and TaskResultOption](#169) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Add explicit type parameters to ignore functions](#174) Credits [@cmeeren](https://github.com/cmeeren)
- [Moves many functions to inline with InlineIfLambda for performance](#166) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Native Tasks for TaskResult, TaskOption, and TaskResultOption](#169) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Add explicit type parameters to ignore functions](#174) Credits [@cmeeren](https://github.com/cmeeren) - [Adds CancellableTaskResult](#172) Credits [@TheAngryByrd](https://github.com/TheAngryByrd)
- [Moves many functions to inline with InlineIfLambda for performance](#166) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Native Tasks for TaskResult, TaskOption, and TaskResultOption](#169) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Add explicit type parameters to ignore functions](#174) Credits [@cmeeren](https://github.com/cmeeren) - [Adds CancellableTaskResult](#172) Credits [@TheAngryByrd](https://github.com/TheAngryByrd)
- [Moves many functions to inline with InlineIfLambda for performance](#166) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Native Tasks for TaskResult, TaskOption, and TaskResultOption](#169) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Add explicit type parameters to ignore functions](#174) Credits [@cmeeren](https://github.com/cmeeren) - [Adds CancellableTaskResult](#172) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Fixes TaskResultCE breaking with a bind in branching such as if](#177) Credits [@TheAngryByrd](https://github.com/TheAngryByrd)
Since |
I address some of this here: additionally, we still do have Ply as a dependency for older .net versions still around so I’d rather kept them together in the codebase. |
Got it, thanks! |
- [Fixing stackoverflows in large while loops](#182) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Moves many functions to inline with InlineIfLambda for performance](#166) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Native Tasks for TaskResult, TaskOption, and TaskResultOption](#169) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Add explicit type parameters to ignore functions](#174) Credits [@cmeeren](https://github.com/cmeeren) - [Adds CancellableTaskResult](#172) Credits [@TheAngryByrd](https://github.com/TheAngryByrd) - [Fixes TaskResultCE breaking with a bind in branching such as if](#177) Credits [@TheAngryByrd](https://github.com/TheAngryByrd)
Proposed Changes
Closes #142
Types of changes
What types of changes does your code introduce to FsToolkit.ErrorHandling?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
To make all the existing tests to pass. I had to implement my own versions of
While
andCombine
as described by BDFN.Testing the Dynamic path isn't easy currently. Commenting out the state machine part of
Run
and delegating directly toRunDynamic
is how I tested some implementations. The only other way I've seen is implement additional CE's and force it to not inline the state machine.I implementedTests have been added and I've implemented a corresponding version using Ply in the netstandard2.0 TFM.backgroundTaskResult
andbackgroundTaskOption
but I haven't added tests around them.This now uses it's own resumable code implemenation.taskResultOption
is implemented in the laziest way possible by re-using the native Task resumption code.