How does .NET make use of IO Threads or IO Completion Ports?

Chances are that you don’t have to do anything if you are using the asynchronous methods already. Depending on the technology that you are using for the call to the web service, ultimately, it’s going to drop down to the Win32 API to make the call to get bytes from the network, and to that end, it will use I/O Completion Ports in order to handle asynchronous calls.

The basic premise behind I/O completion ports is that when waiting on I/O operations, there is a thread pool that is kept waiting for when the I/O operations complete (assuming you registered to use I/O completion ports). When your registered operation completes, the thread from the I/O completion port thread pool is used to handle the callback.

Of course, after calling out to the I/O completion port, your thread can move on to do more work, or terminate, the choice is up to you.

The following should help describe it more:

I/O Completion Ports:

http://msdn.microsoft.com/en-us/library/aa365198(VS.85).aspx

Inside I/O Completion Ports (WayBack Machine):

https://web.archive.org/web/20101101112358/http://doc.sch130.nsc.ru/www.sysinternals.com/ntw2k/info/comport.shtml

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)