<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.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>Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx</link><description>[Update: Brad detected a flaw in the code: I had forgotten to initialize the _initialized field. Thanks!] [Update2: Brad detected another flaw in the code: return _instance must be outside the if. Thanks!] In the previous post we’ve seen how we can use</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1715291</link><pubDate>Thu, 13 Aug 2009 09:12:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1715291</guid><dc:creator>Brad</dc:creator><description>&lt;p&gt;Sorry to bring up an old post, but they also need to be made static :)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1715291" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1702612</link><pubDate>Fri, 17 Jul 2009 15:45:04 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1702612</guid><dc:creator>luisabreu</dc:creator><description>&lt;p&gt;I think it&amp;#39;s this: &lt;a rel="nofollow" target="_new" href="http://www.bluebytesoftware.com/blog/PermaLink,guid,543d89ad-8d57-4a51-b7c9-a821e3992bf6.aspx"&gt;www.bluebytesoftware.com/.../PermaLink,guid,543d89ad-8d57-4a51-b7c9-a821e3992bf6.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1702612" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1702606</link><pubDate>Fri, 17 Jul 2009 15:16:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1702606</guid><dc:creator>J</dc:creator><description>&lt;p&gt;Duffy&amp;#39;s blog link is broken.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1702606" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1702575</link><pubDate>Fri, 17 Jul 2009 12:53:57 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1702575</guid><dc:creator>luisabreu</dc:creator><description>&lt;p&gt;I&amp;#39;d say no. Check Joe Duffy&amp;#39;s excellent post I mentioned above. I think that it might help you understand why...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1702575" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1702556</link><pubDate>Fri, 17 Jul 2009 11:24:51 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1702556</guid><dc:creator>Brad</dc:creator><description>&lt;p&gt;I keep revisiting this code, as im using it throughout my applications now. I have a question, would you want to put a volatilewrite for setting initialize?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1702556" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1699951</link><pubDate>Mon, 13 Jul 2009 04:22:11 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1699951</guid><dc:creator>Brad</dc:creator><description>&lt;p&gt;Another flaw, the return _instance; needs to go one bracket down :) (it currently returns in the if statement)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1699951" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1698520</link><pubDate>Tue, 07 Jul 2009 00:59:09 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1698520</guid><dc:creator>Brad</dc:creator><description>&lt;p&gt;One quick question, where does the value of _initialized change from 0?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1698520" width="1" height="1"&gt;</description></item><item><title>re: Multithreading: using VolatileXXX instead of the volatile keyword</title><link>http://msmvps.com/blogs/luisabreu/archive/2009/07/06/multithreading-using-volatilexxx-instead-of-the-volatile-keyword.aspx#1698516</link><pubDate>Tue, 07 Jul 2009 00:25:36 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1698516</guid><dc:creator>Brad</dc:creator><description>&lt;p&gt;These articles are fantastic! I only discovered this site yesterday, so I have a lot of catching up and backreading to do.&lt;/p&gt;
&lt;p&gt;Thank you very much!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1698516" width="1" height="1"&gt;</description></item></channel></rss>