I've seen a lot of old examples in C# for long-running tasks using background worker etc- and am relatively new to F#.
I would like to set up some code in an F# project that runs for a while and reports progress back to a C# WPF progress bar.
I can see over time there are several ways to do it but I am having a bit of trouble finding out which methods are obsolete. Background worker , passing progress as a parameter when starting the task, binding using MVVM .
let DoSomething(progress: IProgress<int> ) =
for i in [1..100] do
Thread.Sleep(100);
progress.Report(i);