Computation Expression
CancellableTaskResult Computation Expression
Namespace: FsToolkit.ErrorHandling
CancellableTaskResult Examples
Example 1
The initial motivating example is perhaps more realistic if some functions are asynchronous. Given the following functions:
A login flow can be implemented as below using the cancellableTaskResult
CE and a few helpers:
BackgroundCancellableTaskResults
You also have an option to use the 'backgroundCancellableTaskResult' computation expression. It will still use the CancellableTaskResult type, but it will escape to a background thread where necessary.
Last updated