I think what you're looking for can be accomplished with
IProgress<T> and the default implementation
Progress<T> is the way to report progress from another context.
Have a look at: Reporting Progress from Async Tasks
And a sample from the post by @StephenCleary
public async void StartProcessingButton_Click(object sender, EventArgs e)
// The Progress<T> constructor captures our UI context,
// so the lambda will be run on the UI thread.
var progress = new Progress<int>(percent =>
textBox1.Text = percent + "%";
// DoProcessing is run on the thread pool.
await Task.Run(() => DoProcessing(progress));
textBox1.Text = "Done!";
public void DoProcessing(IProgress<int> progress)
for (int i = 0; i != 100; ++i)
Thread.Sleep(100); // CPU-bound work
if (progress != null)