<?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>Lock(object) and ThreadAbortException</title><link>http://blogs.msdn.com/b/junfeng/archive/2007/07/30/lock-object-and-threadabortexception.aspx</link><description>We have experience some weird deadlock using managed code. 
 We have a class with some shared resources. To protect the shared resources, we create a synchronization object, and use Lock(object) prior to access the shared resources. There is no nested</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Lock(object) and ThreadAbortException</title><link>http://blogs.msdn.com/b/junfeng/archive/2007/07/30/lock-object-and-threadabortexception.aspx#4146800</link><pubDate>Tue, 31 Jul 2007 15:02:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4146800</guid><dc:creator>Mihailik</dc:creator><description>&lt;p&gt;Do you have a solution for that problem yet?&lt;/p&gt;
&lt;p&gt;It appears to me that it must be a common major slip in 'using' and 'lock' statement implementation.&lt;/p&gt;
&lt;p&gt;BTW, there is a way to amortise the trouble, by wrapping Monitor's functionality in CriticalFinalizer object. Even if async exception happens, the lock will be released sometimes latter.&lt;/p&gt;
&lt;p&gt;But it is not the true solution in general case. I think Microsoft should address async exception problem with something substantial.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4146800" width="1" height="1"&gt;</description></item><item><title>re: Lock(object) and ThreadAbortException</title><link>http://blogs.msdn.com/b/junfeng/archive/2007/07/30/lock-object-and-threadabortexception.aspx#4133711</link><pubDate>Mon, 30 Jul 2007 19:16:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4133711</guid><dc:creator>Anderson Imes</dc:creator><description>&lt;p&gt;I wouldn't say managed code makes it more challenging to write a reliable product - it just gives you a different set of reliability problems to worry about.&lt;/p&gt;
&lt;p&gt;Reliability is always a challenge, no matter what language you work with.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4133711" width="1" height="1"&gt;</description></item></channel></rss>