Article

The case of the progress callback that never got called when progress happened

The Old New Thing ·The Old New Thing ·Published 2026-09-03 ·5 min read

This article discusses a debugging issue related to a progress handler in a C# async method that fails to get called. It provides insights into troubleshooting the problem from both C# and C++ perspectives.

From the article

A colleague was trying to figure out why their progress handler wasn’t being called.

// C# async Task<bool> DownloadItemAsync(string id) { var op = item.DownloadAsync(id); op.Progress += (s, pct) UpdateProgress(pct); var result = await op; ClearProgress(); return result; } This is pretty standard stuff. Start the operation, hook up the progress, and then wait for the operation to complete. But they never got any progress.

I asked them to check if maybe the item was downloading so fast that they missed all the progress. But no, even if the download takes a long time, they never get any progress.


Share this resource


Discovered 2026-09-04 Source The Old New Thing Archive 2026-09 →