For the reference: it's the .Net WaitForInputIdle() implementation that throws an exception: https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5a... https://github.com/dotnet/runtime/blob/5535e31a712343a63f5d7d796cd874e563e5a...