I've been using the VS 2010 Concurrency Visualizer to profile how threads interact in my application. The application pretty much just loads a file into memory. When digging into results I was suprised to find that CLR worker threads were doing I/O.
I'm surprised by this because I'm intentionally doing Asyc I/O.
When I click on one of the I/O segments in the swim lane I see in the call stack that the FileStream's BeginRead method is in the call stack. After the I/O segment there's an execution segment. In the call stack in the execution segment it is showing that
BeginRead is calling EndRead. I was completly blown away when I saw that.
Something must be wrong. Under what conditions will BeginRead call EndRead?
View Complete Post