<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx</link><description>These days, the testers in Indigo are working on their TDSs (test design specifications). I own testing an area for which I needed to read up PostQueuedCompletionStatus; which lead to reading about async I/O and I/O completion ports. Pretty interesting</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx#43586</link><pubDate>Mon, 15 Dec 2003 13:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:43586</guid><dc:creator>Ricky Datta</dc:creator><description>Are you saying CLR does not use&lt;br&gt;CreateIoCompletionPort /PostQueuedCompletionStatus/... for asynch I/O on win2003 ?</description></item><item><title>re: Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx#43620</link><pubDate>Mon, 15 Dec 2003 20:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:43620</guid><dc:creator>kavita kamani</dc:creator><description>Yes the CLR thread pool threads (QueueUserWorkItem) do not use PostQueuedCompletionStatus. I think this excerpt clarifies that....&lt;br&gt;&lt;br&gt;The full article is at: &lt;a target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconThreadPooling.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconThreadPooling.asp&lt;/a&gt;&lt;br&gt;&lt;br&gt;There are several scenarios in which it is appropriate to create and manage your own threads instead of using the ThreadPool. You should do so: &lt;br&gt;&lt;br&gt;.....&lt;br&gt;If you have a task that might run a long time (and therefore block other tasks). &lt;br&gt;.....</description></item><item><title>re: Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx#62672</link><pubDate>Sun, 25 Jan 2004 11:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:62672</guid><dc:creator>Feroze Daud</dc:creator><description>On all NT platforms, I/O completion ports are available for CLR applications to use. You can do this through the three functions in System.Threading.Thread:&lt;br&gt;&lt;br&gt;1) Overlapped.Pack&lt;br&gt;2) Overlapped.Unpack&lt;br&gt;3) ThreadPool.BindHandle.&lt;br&gt;&lt;br&gt;Normally, you dont need to call anyone of these functions, unless you are implementing a managed wrapper for a native NT object (eg: namedpipe). Some of the classes that ship in the framework (eg: Socket) automatically call these api's for you.&lt;br&gt;&lt;br&gt;On NT, CLR threadpool will automatically start a CompletionPort thread, which calls GetQueuedCompletionStatus, and calls your I/o callback. So, for eg: System.Net.Sockets on NT automatically uses completion ports. So does System.IO.FileStream, and other native I/O related api's in the framework.&lt;br&gt;&lt;br&gt;On 9x platforms, the System.Net.Sockets.Socket class defaults to Overlapped I/O.&lt;br&gt;</description></item><item><title>re: Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx#91209</link><pubDate>Wed, 17 Mar 2004 17:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:91209</guid><dc:creator>Andy Neilson</dc:creator><description>I'm using the Overlapped.Pack, Overlapped.Unpack and ThreadPool.BindHandle methods to do async I/O on named pipes. This seems to work, but it seems that it should fail given what I know about the native APIs. &lt;br&gt;&lt;br&gt;If I call BindIoCompletionCallback on a handle, the thread that initiates the I/O operation is not supposed to terminate before the I/O operation completes. This could be accomplished by queuing the operation that initiates the I/O to an I/O thread, thus ensuring that the calling thread never terminates before the I/O operation completes.&lt;br&gt;&lt;br&gt;The problem is that ThreadPool.QueueUserWorkItem doesn't allow you to specify that the item should be processed on an I/O thread (as the native QueueUserWorkItem does).&lt;br&gt;&lt;br&gt;Since this idiom is used by my code and the .NET Framework's async I/O implementation, and both seem to work, I have to assume that something is handling under the covers in the CLR that handles this properly. The lack of documentation or explanation makes me a bit nervous.</description></item><item><title>re: Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx#91423</link><pubDate>Wed, 17 Mar 2004 22:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:91423</guid><dc:creator>Kavita Kamani</dc:creator><description>Hi Andy,&lt;br&gt;&lt;br&gt;You are perfectly right - there is some sort of support in C#, but there is no explicit way to say if an item should be delegated to an IO thread. Our team is talking with the CLR folks to get this support in the whidbey timeframe, but as of now, I dont have any status that I can disclose about this.&lt;br&gt;Kavita</description></item><item><title>re: Async I/O and I/O completion ports</title><link>http://blogs.msdn.com/kavitak/archive/2003/12/15/Async-I_2F00_O-and-I_2F00_O-completion-ports.aspx#121055</link><pubDate>Tue, 27 Apr 2004 17:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:121055</guid><dc:creator>Jamesy</dc:creator><description>I thought that Windows 9x systems could not support Overlapped I/O, as it required Winsock 2? is this correct?</description></item></channel></rss>