<?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>Building Async Coordination Primitives, Part 1: AsyncManualResetEvent</title><link>http://blogs.msdn.com/b/pfxteam/archive/2012/02/11/10266920.aspx</link><description>The Task-based Async Pattern (TAP) isn’t just about asynchronous operations that you initiate and then asynchronously wait for to complete.&amp;#160; More generally, tasks can be used to represent all sorts of happenings, enabling you to await for any matter</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Building Async Coordination Primitives, Part 1: AsyncManualResetEvent</title><link>http://blogs.msdn.com/b/pfxteam/archive/2012/02/11/10266920.aspx#10309965</link><pubDate>Thu, 24 May 2012 15:56:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10309965</guid><dc:creator>Stephen Toub - MSFT</dc:creator><description>&lt;p&gt;Hi Upsilon-&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad you enjoyed the series. Regarding Reset, it just depends on how aggressive you want the method to be, e.g. if you&amp;#39;re ok with Reset being less aggressive (which functionally should be fine), you could remove the while, but you still do need the interlocked.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10309965" width="1" height="1"&gt;</description></item><item><title>re: Building Async Coordination Primitives, Part 1: AsyncManualResetEvent</title><link>http://blogs.msdn.com/b/pfxteam/archive/2012/02/11/10266920.aspx#10309938</link><pubDate>Thu, 24 May 2012 14:40:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10309938</guid><dc:creator>Upsilon Chen</dc:creator><description>&lt;p&gt;Hi Stephen,&lt;/p&gt;
&lt;p&gt;Thanks for these inspiring articles!&lt;/p&gt;
&lt;p&gt;I got a question about the Reset() part of the sample code:&lt;/p&gt;
&lt;p&gt;why do we need the &amp;quot;while&amp;quot; statement?&lt;/p&gt;
&lt;p&gt;According to the code, the only chance to repeat the process in the &amp;quot;while&amp;quot; block is when &amp;quot;tcs&amp;quot; is not equal to &amp;quot;m_tcs&amp;quot;, and that means there is another thread called &amp;quot;Reset&amp;quot; and assigned a new instance to &amp;quot;m_tcs&amp;quot;. In such case, &amp;nbsp;is there any problem if we just return the &amp;quot;Reset&amp;quot; call and not do the process in the &amp;quot;while&amp;quot; block again?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10309938" width="1" height="1"&gt;</description></item><item><title>re: Building Async Coordination Primitives, Part 1: AsyncManualResetEvent</title><link>http://blogs.msdn.com/b/pfxteam/archive/2012/02/11/10266920.aspx#10270584</link><pubDate>Tue, 21 Feb 2012 16:54:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10270584</guid><dc:creator>Stephen Toub - MSFT</dc:creator><description>&lt;p&gt;Hi Gregory-&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad you like the content. &amp;nbsp;And thanks for the suggestion; I&amp;#39;ll keep that in mind for future posts.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10270584" width="1" height="1"&gt;</description></item><item><title>re: Building Async Coordination Primitives, Part 1: AsyncManualResetEvent</title><link>http://blogs.msdn.com/b/pfxteam/archive/2012/02/11/10266920.aspx#10270527</link><pubDate>Tue, 21 Feb 2012 15:21:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10270527</guid><dc:creator>Gregory Chernis</dc:creator><description>&lt;p&gt;Stephen,&lt;/p&gt;
&lt;p&gt;Great content, as always.&lt;/p&gt;
&lt;p&gt;May I propose using locks to protect the TaskCompletionSource member field? &amp;nbsp;It might better serve the general audience, without muddying up the issue with volatile and Interlocked. &amp;nbsp;Your approach feels like a solution that was optimized for performance.&lt;/p&gt;
&lt;p&gt;It would also be instructional to see how such code is tested.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10270527" width="1" height="1"&gt;</description></item></channel></rss>