<?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>Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx</link><description>They multiply.</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>The Old New Thing : Just change that 15 to a 1</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#741112</link><pubDate>Tue, 05 Sep 2006 17:01:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:741112</guid><dc:creator>The Old New Thing : Just change that 15 to a 1</dc:creator><description>PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/oldnewthing/archive/2006/09/05/741110.aspx"&gt;http://blogs.msdn.com/oldnewthing/archive/2006/09/05/741110.aspx&lt;/a&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=741112" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#493889</link><pubDate>Thu, 17 Nov 2005 17:53:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:493889</guid><dc:creator>BryanK</dc:creator><description>Nekto -- I would love to see that done (for one, it would mean you could install most patches without a reboot: the only updates that would require a reboot would be the ones that affect services or drivers that are required at all times by the kernel).&lt;br&gt;&lt;br&gt;Unfortunately, I don't know how many programs use that (IMO mis-) feature as a way to do a lock-file with automatic clean-up (where if a process holds the lock-file and crashes, it'll get cleaned up the next time someone requests the lock).  A change like that would break compatibility, which is extremely unfortunate.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=493889" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#492938</link><pubDate>Tue, 15 Nov 2005 18:39:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:492938</guid><dc:creator>Nekto</dc:creator><description>&amp;quot;If I try to delete a file too quickly after closing the program that had the file open&amp;quot;&lt;br&gt;&lt;br&gt;;)&lt;br&gt;The &amp;quot;best&amp;quot; solution whould be for DeleteFile function is to trace who is using file and find out if it trying to close itself. If yes - show message &amp;quot;Sorry we are waiting for that slow thing..&amp;quot; in notfication area. And to delete it after.&lt;br&gt;*joke*&lt;br&gt;&lt;br&gt;What do you think about &amp;quot;unix way&amp;quot;? To delete file from list but not from disk until any handler exist and delete it only when that is freed. So user see file deleted instantly.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=492938" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#491820</link><pubDate>Fri, 11 Nov 2005 19:52:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:491820</guid><dc:creator>Neil</dc:creator><description>Similarly I look at the files on a floppy before deciding I can format it (see later blog!) and of course the format fails because explorer has locked the drive...&lt;br&gt;&lt;br&gt;Surely that &amp;quot;Deleting...&amp;quot; progress dialog should display while Explorer is retrying? Or maybe it does now, and I should upgrade.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=491820" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#490903</link><pubDate>Wed, 09 Nov 2005 20:58:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490903</guid><dc:creator>Dan</dc:creator><description>Ok - a bit off topic, but tangentially related to the retry delay on delete. When you are viewing a sub directory in an explorer window and right-click on a parent directory (in the folder list) and choose delete, you experience the delay while explorer retries deleting something that it has locked itself.&lt;br&gt;&lt;br&gt;I can't tell you how many times I do this as it is so natural. You'd think I'd learn...&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490903" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#490821</link><pubDate>Wed, 09 Nov 2005 18:47:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490821</guid><dc:creator>Tim</dc:creator><description>&amp;quot;Sometimes it seems Microsoft uses the &amp;quot;compatability&amp;quot; excuse to avoid work.&amp;quot;&lt;br&gt;&lt;br&gt;Somewhere, Raymond's head is exploding :-D&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490821" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#490728</link><pubDate>Wed, 09 Nov 2005 10:20:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490728</guid><dc:creator>mirobin</dc:creator><description>Terminating a thread to abort an operation is never a safe thing to do, and is a good way to introduce a deadlock in your application.  You have no idea what kind of resources/locks the thread you are terminating has a hold on (ex:  the loader lock) when you yank the rug out, leading to unpredictable behavior later down the line.&lt;br&gt;&lt;br&gt;At best, you would write the thread in such a manner that it could be abandoned by your application.&lt;br&gt;&lt;br&gt;As far as the points the AC raises about retrying always being an unreliable solution, I would disagree to a point.  If you expect that the application could take up to 5 seconds to shutdown, then yes retrying for 5 seconds is not reliable.  If you expect that the *worst case* is that the application takes 5 seconds to shutdown then it is reliable.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490728" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#490557</link><pubDate>Wed, 09 Nov 2005 01:28:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490557</guid><dc:creator>Derek</dc:creator><description>&amp;gt;I think the easiest solution to this problem is &lt;br&gt;&amp;gt;not to retry N times, but to retry for at most X &lt;br&gt;&amp;gt;seconds. That way you don't have to worry about &lt;br&gt;&amp;gt;how many times the layer below you has retried &lt;br&gt;&amp;gt;and retry delays won't be multiplicative. &lt;br&gt;&lt;br&gt;The problem is that lower layers shouldn't be retrying at all.  If you decide to retry for, say, 5 seconds, and the function you call decides to keep going for 3 years, what can you do about it?  If the layer underneath doesn't have some sort of timeout functionality, you're just going to have to wait.  You could create a second thread to monitor and kill the first thread if it takes too long but that's problematic because it's 1) way to complex a fix for something that shouldn't be happening at all, and 2) going to cause massive problems with resource leaks in the inknowingly-terminated thread.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490557" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#490504</link><pubDate>Tue, 08 Nov 2005 23:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490504</guid><dc:creator>Anonymous Coward</dc:creator><description>As I said - if 4 retries are not sufficient, then 5 retries are no guarantee of success. The current system can *at best* mask problems up until something makes excel take 5.01 seconds instead of 4.99 seconds to release a file.&lt;br&gt;&lt;br&gt;This means that scripts will fail erratically, not consistently, and if they're really that important then they damn well ought to be written by someone who's done more than read half way through &amp;quot;Learn Visual Basic For Applications in 21 Days&amp;quot;.  (Either that or the accountant writing scripts should quit whining when some coder who's read half of &amp;quot;Accounting For Dummies&amp;quot; thinks they know more about business management than the guy who spent 5 years at Harvard. Apparantly there's something in the water that makes people have no respect for any profession besides their own.)&lt;br&gt;&lt;br&gt;Yeah, the current system can mask problems and make amateurs think that their badly written code is actually reliable. I'm not sure that's worth the irritaion of every user who gets an unresponsive user interface, but there's programers all over the world who'ld disagree with me.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490504" width="1" height="1"&gt;</description></item><item><title>re: Take it easy on the automatic retries</title><link>http://blogs.msdn.com/b/oldnewthing/archive/2005/11/07/489807.aspx#490497</link><pubDate>Tue, 08 Nov 2005 23:34:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:490497</guid><dc:creator>Cooney</dc:creator><description>&amp;gt; You'd be surprised how many scripts consist of replaying mouse clicks and keystrokes.&lt;br&gt;&lt;br&gt;*shudder* Maybe not.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=490497" width="1" height="1"&gt;</description></item></channel></rss>