<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Ankur</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ankur/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ankur/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:13:03 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Can you crack this II?</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/can-you-crack-this-ii</link>
      <pubDate>Tue, 20 Dec 2005 05:04:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/12/20/can-you-crack-this-ii/</guid>
      <description><![CDATA[Here are the next round questions
1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This was a jigsaw the we solved...]]></description>
      <content:encoded><![CDATA[<p>Here are the next round questions<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></p>
<p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo1"><span style="mso-list: Ignore">1.<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>This was a jigsaw the we solved to get pictures with following words<o:p></o:p></p>
<p style="MARGIN-LEFT: 0.5in">go a little soft to find the latest one:-<o:p></o:p></p>
<p style="MARGIN-LEFT: 0.5in">picture of <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:city w:st="on">chicago</st1:city> the movie -----&gt;&nbsp;statue of elvis&nbsp; ---------&gt; picture of&nbsp;<st1:place w:st="on"><st1:city w:st="on">london</st1:city></st1:place>'s eye Millenium wheel ---------&gt; painting "whistler's mother" ---------&gt;<strong> ?<o:p></o:p></strong></p>
<p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo1"><b><span style="mso-list: Ignore">2.<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></b><span style="mso-bidi-font-weight: bold">This one had a song playing that I cannot put here. I solved it without using the song<b><o:p></o:p></b></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">why lock the key to common wealth?<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">pro bono help is not an encoded art<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">so, wales decided to share me with you<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">but now you have to play your part<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">at the land where this song comes from<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">people call me fast<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">who am i... ask me!<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">(other clues - poster of Fast and the Furious, Greek-English dictionary and Greek grammar books in a shelf, a globe/sphere in the background, piece of jigsaw puzzle in the background, audio clip of a song that sounds Hawaiian/Italian/Greek)<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"><o:p>&nbsp;</o:p></span></p>
<p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo1"><span style="mso-bidi-font-weight: bold"><span style="mso-list: Ignore">3.<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;<font size=3>&nbsp; Do not use view source to</font> </span></span></span><span style="mso-bidi-font-weight: bold">crack this and find the font for encrypted part. You are supposed to do the decryption on your own and thats not the only thing you need to crack.</span></p>
<p style="MARGIN-LEFT: 0.25in"><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">abcdefghijklmnopqrstuvwxyz<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">ana</span><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime"> feels threatened while everyone finds me cool<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">now no one needs to sit like a dumb fool<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">i am an ugly </span><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">bipod</span><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime"> with huge </span><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">antennae</span><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime"><o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">i have a </span><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">titanium</span><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime"> front<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">and a </span><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">solgel </span><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">infra-red posterior<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">unfortunately this time machine uses no such material<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; BACKGROUND: lime; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana; mso-highlight: lime">who am i?<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="BACKGROUND: lime; mso-highlight: lime"><span style="mso-tab-count: 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="BACKGROUND: lime; FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-highlight: lime">htaed neercs</span><span style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold"><o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold"><o:p>&nbsp;</o:p></span></p>
<p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo1"><span style="mso-list: Ignore">4.<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="mso-spacerun: yes">&nbsp;</span>And the last one.</p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">To reach the gate of glory and fame<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">You will have to guess my name...<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana"><o:p>&nbsp;</o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">My master's fame flew at unseen heights<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">When his tireless and unfed creation lost two dozen clocks<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">My master joined hands with the lord of the 'unexplored' skies<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">Together they created me and my swift brother...<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">My mischievous kin jumped off my belly<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">and disappeared into the ether...<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">If you think my master got cross,<o:p></o:p></span></p>
<p class=MsoNormal style="MARGIN: 0in 0in 0pt 1in; mso-layout-grid-align: none"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Verdana; mso-bidi-font-family: Verdana">You would be right, but it was no loss...<o:p></o:p></span></p>
<p style="MARGIN-LEFT: 0.25in"><o:p>&nbsp;</o:p></p>]]></content:encoded>
    </item>
    <item>
      <title>Can you crack this?: Solutions</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/can-you-crack-this-solutions</link>
      <pubDate>Tue, 20 Dec 2005 04:46:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/12/20/can-you-crack-this-solutions/</guid>
      <description><![CDATA[First thing first sorry guys for not&nbsp;posting&nbsp;for so long&nbsp;was out&nbsp;for long...]]></description>
      <content:encoded><![CDATA[<p>First thing first sorry guys for not&nbsp;posting&nbsp;for so long&nbsp;was out&nbsp;for long time.</p>
<p>Here are the solutions:</p>
<ol>
<li>This was very straight forward. <strong>Blue Gene</strong>, the IBM super computer. Royal DNA (Gene) born out of sand (which is how you make silicon). It is the most powerful in the world now. Its kin can beat the russian master (which would be Deep Blue) and they proved to the japanese that they are faster (they beat Japans Earth simulator to take the top spot). 
</li><li>We first went looking for somthing related to "Flash Gordon comic strip" but that was a wrong path to follow. We then just thought of looking into NASA missions to Mars and found the answer. <strong>Mars Exploration rover Spirit.</strong> it downloaded the first photograph on tuesday 6th Jan 2004 and then it abruptly ceased communicating with mission control&nbsp;due to a "Flash memory anomaly". It recently went over "Husband hill" (spouse). 
</li><li><font size=3>With this one we tried a lot of things but we finally got it by fluke. <a href="/akashmaheshwari">Akash</a> had this stupid idea that the mystry part is related to the The Impact Theory&nbsp;by Luis and Walter Alveraz.&nbsp;This led us to K/T boundry and iridium and bingo&nbsp;we found our "Tennant". rest we just fitted. <strong>IRIDIUM</strong> - discovered by Smithson "Tennant". in London. - Atomic number 77 - Fortran also used 77 as version. 77 satellites planned but only 66 deployed, i.e. 6 taken out of 666 (devil's number). "Calling planet earth" tag line for failed Iridium project of IBM.</font></li></ol>
<p><font size=3>There are few more in the coming post.</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Can you crack this?</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/can-you-crack-this</link>
      <pubDate>Tue, 06 Dec 2005 06:51:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/12/06/can-you-crack-this/</guid>
      <description><![CDATA[One of the carziest puzzels I ever came accross...
We(me, Amit Chat and Satej)&nbsp;are taking part...]]></description>
      <content:encoded><![CDATA[<P>One of the carziest puzzels I ever came accross...</P>
<P>We(me, Amit Chat and Satej)&nbsp;are taking part in the <A href="https://www.isb.edu/poseidon/">onlie treasure hunt</A> organized by <A href="https://www.isb.edu/">ISB folks</A>. The first day was a breeze the moment we saw the clue we had the answer. Here is the clue:</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr><EM>I am the royal DNA born out of sand<BR>Most powerfull- who has conqured the Earth land<BR>My kin can out-think the russian master<BR>I have proven to the Japanese that I am faster....<BR>Who am I?</EM></P>
<P><EM></EM>&nbsp;</P></BLOCKQUOTE></BLOCKQUOTE>
<P>Second day we went on a wrong track but still the answer was logical</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P><BR><EM>On Tuesday,<BR>I had downloaded the book that Alex Raymond wrote in 1934,<BR>but it got corrupted …<BR>I went on a drive over the red hills with my spouse… <BR>and made history!! <BR>Listen to the song to know my soul...</EM></P>
<P><EM>&lt;Song: Here I am from Sprit of Cimmeron by Brayan Adams&gt;</EM></P>
<P><EM>while I rock and roll the unexplored...<BR>What is my name?</EM></P></BLOCKQUOTE></BLOCKQUOTE>
<P>Third day was bad we just got it with our team + <a href="https://blogs.msdn.com/akashmaheshwari">akash </A>and <a href="https://blogs.msdn.com/khushboo/">khushboo</A> searching for anything related to physics and chemistry on MSN\google\wiki. </P>
<P>We looked at all the constants (the value of Gravitational constant is 6.67*POW(10,-11)),&nbsp; all the heavely bodies affecting earth. </P>
<P>We racked our brain with periodic table for atomic number 66 (Dysprosium) but no luck.</P>
<P>&nbsp;And most baffling was the relation of this photograph with the answer. We even searched for all the Nobel prize winners in field of physics and chemistry to figure this out.</P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><IMG src="https://storage.msn.com/x1pYxs3zIdyf85fKogzeGQ3p2H1-_Tvf4YIQewmFA59L-E9yXM150LRY_jT5IoUsi5pevgByTkVHDqnOo9blXkhnxZ6KDWbC2c80Nn7xl4pzwPPCoLiE5Y4dK4ROK7PywqmbKKMIXr__wPnbnC7H8VvJw"> 
<P><EM>My coming into your world is an ancient mystery.<BR>A tenant in London discovered me and made history.<BR>To formulate and translate someone borrowed my number.<BR>But all I did was go around and then go into deep slumber. <BR>I missed the devil by one over the boundary.<BR>Called earth and left everyone in quandary. </EM></P>
<P><EM>So… who am I?</EM> <BR></P></BLOCKQUOTE></BLOCKQUOTE>
<P dir=ltr>Do you have an answer? </P>
<P dir=ltr>Tell me if you can crack this relationship. And now i have to solve todays clue. will keep you posted.</P>
<P dir=ltr>-ankur</P>]]></content:encoded>
    </item>
    <item>
      <title>Thread.Abort() on a thread executing a Finally/Catch or .ctor block.</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/thread-abort-on-a-thread-executing-a-finallycatch-or-ctor-block</link>
      <pubDate>Wed, 30 Nov 2005 04:07:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/11/30/thread-abort-on-a-thread-executing-a-finallycatch-or-ctor-block/</guid>
      <description><![CDATA[Issue: If a thread t is in some catch or finally or cctor block, calling t.Abort() from another...]]></description>
      <content:encoded><![CDATA[<P><STRONG><U>Issue:</U></STRONG> <FONT size=2><FONT size=3>If a thread t is in some catch or finally or cctor block, calling t.Abort() from another thread does not have any effect on the thread.</FONT> </FONT><FONT size=3>Here is the code to repro this.</FONT></P><PRE><FONT color=#0000ff size=2><P>using</FONT><FONT size=2> System;</P></FONT><FONT color=#0000ff size=2><P>using</FONT><FONT size=2> System.Threading;</P></FONT><FONT color=#0000ff size=2><P>namespace</FONT><FONT size=2> ConsoleApplication2</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> Program</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2> t;</P><P>[</FONT><FONT color=#008080 size=2>STAThread</FONT><FONT size=2>]</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Main(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>[] args)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.CancelKeyPress += </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>ConsoleCancelEventHandler</FONT><FONT size=2>(Console_CancelKeyPress);</P><P>t = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2>(ChildThread);</P><P>t.Start();</P><P>t.Join();</P></BLOCKQUOTE><P>}</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> ChildThread()</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>try</P></FONT><FONT size=2><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>throw</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Exception</FONT><FONT size=2>();</P></BLOCKQUOTE><P>}</P><P></FONT><FONT color=#0000ff size=2>catch</FONT><FONT size=2> (</FONT><FONT color=#008080 size=2>Exception</FONT><FONT size=2>)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>try</P></FONT><FONT size=2><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#800000 size=2>"going to sleep"</FONT><FONT size=2>);</P><P></FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2>.Sleep(10000);</P><P></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#800000 size=2>"out of sleep"</FONT><FONT size=2>);</P></BLOCKQUOTE><P>}</P><P></FONT><FONT color=#0000ff size=2>catch</FONT><FONT size=2> (</FONT><FONT color=#008080 size=2>ThreadAbortException</FONT><FONT size=2> e)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(e.ToString());</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Console_CancelKeyPress(</FONT><FONT color=#008080 size=2>Object</FONT><FONT size=2> sender, </FONT><FONT color=#008080 size=2>ConsoleCancelEventArgs</FONT><FONT size=2> e)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#800000 size=2>"aborting"</FONT><FONT size=2>);</P><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (t != </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P>t.Abort();</P><P>t.Join();</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P></FONT></PRE>
<P>Run the code and press CTRL+C to repro. </P>
<P>Club this issue&nbsp;with <a href="https://blogs.msdn.com/abhinaba/archive/2005/10/01/476026.aspx">try\retry code&nbsp;in Abhinaba's blog</A> and you have infinitly waiting call. May be this is the reason <a href="https://blogs.msdn.com/oldnewthing/default.aspx">The Old New Thing</A> advices against <a href="https://blogs.msdn.com/oldnewthing/archive/2005/11/07/489807.aspx">using retry indiscriminatly</A>.&nbsp;</P>
<P><STRONG><U>Explaination that&nbsp;I got from the feature team:</U></STRONG></P><FONT color=#0000ff size=2>
<P><FONT color=#000000>Well, this is really interesting. Jeff's answer is a bit misleading; the actual behavior is more complex (and as the person who has to document it, I could wish it were more consistent).</FONT></P>
<P><FONT color=#000000>(1) In the case of the catch block, the call to the Abort method does NOT block and the thread WILL abort as soon as the catch block completes. This is true even if no further code executes on the thread after the catch block.</FONT></P>
<P><FONT color=#000000>(2) In the case of the finally block and the static constructor, the call to the Abort method appears to block until the finally block or static constructor completes! This is totally unexpected. If the thread doesn't execute any more code after the finally block or the static constructor, then ThreadAbortException is never thrown; but if the thread goes on executing long enough it WILL abort. (How long is "long enough"? Well, let's just say it's a race condition.)</FONT></P>
<P><FONT color=#000000>Joe, can we say for sure that this is by design? I don't like the fact that the catch behaves differently from the finally and the static .ctor, and I REALLY don't like the Abort method blocking. </FONT></P>
<P><FONT color=#000000><STRONG>reply to this:</STRONG></FONT></P>
<P><FONT color=#000080 size=3><FONT color=#000000 size=2>We should mention that Aborts called asynchronously on another thread might block, but I don’t know that we should document the exact behavior. Because there are situations where it won’t block, we <I>do not</I> want people to rely on blocking e.g. to signal that the thread has finished its abort.</FONT></P>
<P><FONT color=#000000 size=2>But the more important (IMHO) thing to document is when abort requests are actually processed. Not processing the abort until after leaving catches, finallys, cctors, CERs, and unmanaged code is expected &amp; fine. There are places we know of—e.g. Socket.Accept—which ends up blocking in an FCALL, which means we are unable to interrupt it. So this is an explanation of a bug that a user might reasonably hit.</FONT></P></FONT>
<P></FONT><FONT size=3><STRONG><U>What I don't like About this:</U></STRONG></FONT></P>
<OL>
<LI>As mentioned the call should not be blocking. This leaves the user waiting indefinitly. I have hit this bug making a webservice call and there was an IISREST on the server my call got stuck till there was a timeout at the client side and a Thread.Abort() on given thread was just waiting!!! 
<LI>There is no way to say Abort no matter what. So you may end up adding complex logic to have a clean exit. see my earlier <a href="https://blogs.msdn.com/ankur/archive/2005/09/16/469012.aspx">blog</A>. 
<LI>And to top that there is no documentation arround this.&nbsp;We would have been doomed if we were not in&nbsp;Microsoft. It was easy for us to just mail a discussion group and get a very quick response from the right people. Though they acknowledge this but I know its not an easy process to get the documentation updated after release. Just hope that they do it.</LI></OL>]]></content:encoded>
    </item>
    <item>
      <title>Migration of partial history from VSS to TeamFoundation</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/migration-of-partial-history-from-vss-to-teamfoundation</link>
      <pubDate>Sat, 26 Nov 2005 03:35:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/11/26/migration-of-partial-history-from-vss-to-teamfoundation/</guid>
      <description><![CDATA[I have an VSS repository i have been using for past 5 years but i do not care for history beyond 2...]]></description>
      <content:encoded><![CDATA[<P><STRONG>I have an VSS repository i have been using for past 5 years but i do not care for history beyond 2 years. Moving to Teaamfoundation i would like to discard that history. How do i do that?</STRONG></P>
<P>Either you can use archieve feature in VSS to remove that history from VSS. You can find this in documentation of VSSConverter. But this process can be cumbersome as there is limit to the size of history you can archieve. So you may end up doing archieve of individual folders. </P>
<P>The other option could be a hack (I have come to love this word after my experience in converters :)) based on implementation of incremental migration feature of VSS and this is what we are going to talk about in this blog.</P>
<P>So we just added incremental migration to VSSConverter that looks for checkin comments for figuring out if its a incremental migration and from which point in time it should restart migration. Knowing this we can fool converter by modifyng the required checkin comments to start migration from where ever we want. This can be used to do migration of partial history of VSS. How to do this:</P>
<OL>
<LI>Do a snapshot checkin from the point you want your migration to start. 
<LI>Add the project mappings to the top level folders (destination folders in settings file) in the checkin comments. 
<LI>Add a timestamp to the start of checkin comment of last checkin under the destination folders. For instance add "{3/10/2003}" if you want to migrate from 3/10/2003 onwards. 
<LI>Run the VSSConverter and you have your partial history migrated :).</LI></OL>]]></content:encoded>
    </item>
    <item>
      <title>Incremantal migration with VSSConverter</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/incremantal-migration-with-vssconverter</link>
      <pubDate>Sat, 26 Nov 2005 00:42:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/11/26/incremantal-migration-with-vssconverter/</guid>
      <description><![CDATA[Why incremental migration?
Case 1: Migration takes a lot of time so I will migraqte a copy of my...]]></description>
      <content:encoded><![CDATA[<P><STRONG>Why incremental migration?</STRONG></P>
<P>Case 1: Migration takes a lot of time so I will migraqte a copy of my VSS repository and continue working on the original. after migration of copy I will migrate the delta between original and copy.</P>
<P>Case 2: Migration was stopped in the middle due to power outage/ i had to kill the migration in the middle. I need to migrate from that point onwards.</P>
<P><STRONG>How it works.</STRONG></P>
<P>Vssconverter adds Project mattings specified in settings file to checkin comments of destination projects specified in settings file. So if your settings file has entry</P><PRE><P>&lt;Projects&gt;</P>
<P>&nbsp; &lt;Project From="$/proj1" To="$/TeamProject/proj1" /&gt;&nbsp;</P>
<P>&nbsp;&lt;Project From="$/proj2" To="$/TeamProject/proj2" /&gt;</P>
<P>&lt;/Projects&gt;</P>
</PRE>
<P>then converter adds a comment to "ADD" action of "$/TeamProject/proj1" and "$/TeamProject/proj2" a checkin comment the above mappings</P><PRE><P>-----------------------------------------VSSConverter Project Mappings. Do not modify.----------------------------------------</P>
<P>&nbsp; &lt;From="$/proj1" To="$/TeamProject/proj1" /&gt;&nbsp;</P>
<P>&nbsp;&lt;From="$/proj2" To="$/TeamProject/proj2" /&gt;</P>
</PRE>
<P>this is to check that a user accidently doesn't tries to migrate wrong repository or uses a wrong project mapings.. Vssconverter adds action time of every vss action in checkin comments. this time is used to determine time stamp of last action migrated. When next time converter is run if it finds project mappings in the checkin comment of destination projects&nbsp; it assumes it to be incremental migration. then it checks for time stamp of last action migrated as stated above. Converter then migrates&nbsp;actions only after the last action migrated.</P>]]></content:encoded>
    </item>
    <item>
      <title>More about F1 profiler ( shipped with VS 2005)</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/more-about-f1-profiler-shipped-with-vs-2005</link>
      <pubDate>Thu, 29 Sep 2005 14:03:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/09/29/more-about-f1-profiler-shipped-with-vs-2005/</guid>
      <description><![CDATA[Angry Richard's blog talks about some cool features of new F1 profiles. VSInstr has an option called...]]></description>
      <content:encoded><![CDATA[<P><FONT color=#000000><a href="https://blogs.msdn.com/angryrichard/archive/2005/01/16/354194.aspx">Angry Richard's</A> blog talks about some cool features of new F1 profiles. <FONT face=Arial size=2>VSInstr has an option called include and exclude.&nbsp; This allows you to instrument only certain functions inside your app.&nbsp; It accepts wildcards so you can do things like instrument only a certain class or namespace!!!&nbsp; This allows you to narrow down the data crunch at instrumentation time.&nbsp;</FONT></FONT></P>]]></content:encoded>
    </item>
    <item>
      <title>Profiling: Sampling doesn't report my functions wait time.</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/profiling-sampling-doesnt-report-my-functions-wait-time</link>
      <pubDate>Tue, 27 Sep 2005 14:23:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/09/27/profiling-sampling-doesnt-report-my-functions-wait-time/</guid>
      <description><![CDATA[Working on performance of VSSConverter. I am using the new F1 profiler being shipped with VS 2005. I...]]></description>
      <content:encoded><![CDATA[<P>Working on performance of VSSConverter. I am using the new F1 profiler being shipped with VS 2005. I have a simple code sample like this:</P><PRE> <FONT color=#0000ff size=2><P>using</FONT><FONT size=2> System;</P></FONT><FONT color=#0000ff size=2><P>using</FONT><FONT size=2> System.Collections.Generic;</P></FONT><FONT color=#0000ff size=2><P>using</FONT><FONT size=2> System.Text;</P></FONT><FONT color=#0000ff size=2><P>using</FONT><FONT size=2> System.Threading;</P></FONT><FONT color=#0000ff size=2><P>namespace</FONT><FONT size=2> perf_test</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Program</P></FONT><FONT size=2><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> exit = </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>;</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> lockObject = 3;</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Main(</FONT><FONT color=#0000ff size=2>string</FONT><FONT size=2>[] args)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2> threadWait = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>ThreadStart</FONT><FONT size=2>(WaitMethod));</P><P></FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2> threadProcess = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Thread</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>ThreadStart</FONT><FONT size=2>(ProcessMethod));</P><P>threadWait.Start();</P><P>threadProcess.Start();</P><P>threadWait.Join();</P><P>threadProcess.Join();</P></BLOCKQUOTE><P>}</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> WaitMethod()</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P dir=ltr></FONT><FONT color=#0000ff size=2>lock</FONT><FONT size=2> (lockObject)</P><P dir=ltr>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P dir=ltr></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#800000 size=2>"Starting wait"</FONT><FONT size=2>);</P><P dir=ltr></FONT><FONT color=#008080 size=2>Monitor</FONT><FONT size=2>.Wait(lockObject, 5000);</P><P dir=ltr>exit = </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>;</P><P dir=ltr></FONT><FONT color=#008080 size=2>Monitor</FONT><FONT size=2>.Wait(lockObject, 5000);</P><P dir=ltr></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#800000 size=2>"Ending wait"</FONT><FONT size=2>);</P></BLOCKQUOTE><P dir=ltr>}</P></BLOCKQUOTE><P>}</P><P></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> ProcessMethod()</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#0000ff size=2>while</FONT><FONT size=2> (!exit)</P><P>{</P><BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"><P></FONT><FONT color=#008080 size=2>Console</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#800000 size=2>"Processing"</FONT><FONT size=2>);</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P></BLOCKQUOTE><P>}</P><P><FONT face="Times New Roman" size=3></FONT>&nbsp;</P></PRE>
<P><FONT face="Times New Roman" size=3>Which function do you think will take more time? Obviously WaitMethod(). Try a sampling profiling on that. Here are the results I got:</FONT></P>
<P><FONT face="Times New Roman" size=3></FONT>&nbsp;</P>
<P><IMG src="https://storage.msn.com/x1pYxs3zIdyf85fKogzeGQ3p2H1-_Tvf4YIQewmFA59L-E8yDTelFLA447Iqmnffp_vDD95Dppg3MeSX3Yuoxi8qtZJZV4YO2ceKX29nL4BlKSXtWdXCG7sAYnUt1a9E2-DQCGV-_AZrsdYWaNOOBQ4kA"></P>
<P>(the image is not showing properly ineed to figure out why. but it says 80% time in ProcessMethod() and 3% time in WaitMethod())</P>
<P>What do i get with Instrumentation profiling:</P></FONT>
<P>(It says&nbsp;5003 ms spent in ProcessMethod() and 10028 ms&nbsp;spent in WaitMethod())</P>
<P><IMG src="https://storage.msn.com/x1pYxs3zIdyf85fKogzeGQ3p2H1-_Tvf4YIQewmFA59L-EfOBt_pa5vOpuAUxZFF9ADKhtOyITQ6nXgi1sypEEEXbFlH0Z8umgn-hZ1H-OLxrIsHw3eJrJNj_752tIp4SP6EvyTgAcYzZk0d7zymQ5yfQ"></P>
<P>heres my explaination to what happened.</P>
<P>looking very simplistically sampling is just a statistical data about what your processor was busy doing most of the time. what is done is at regular intervals a snapshot of what is processing is taken. so it misses out if some thread is in wait or sleep.</P>
<P>Instrumentaion modifies your binary and adds code at each function entry and exit. this way yoy get the exact time that was taken by a peice of code to execute including the time spent in wait.</P>
<P>this becomes very evident if you are profiling an application that makes lots of web calls. All such calls go for wait in WebRequest.GetResponse() method and sampling doesn't report the proper time spent in such calls.</P>]]></content:encoded>
    </item>
    <item>
      <title>Settings File for VSSConverter</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/settings-file-for-vssconverter</link>
      <pubDate>Tue, 27 Sep 2005 05:21:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/09/27/settings-file-for-vssconverter/</guid>
      <description><![CDATA[There is some problem with VSSConverter&nbsp;documentation at...]]></description>
      <content:encoded><![CDATA[<P>There is some problem with VSSConverter&nbsp;documentation at <A href="https://msdn2.microsoft.com/en-us/library/ms181247">https://msdn2.microsoft.com/en-us/library/ms181247</A>. It has some bogus &lt;i&gt; &lt;/i&gt; inserted in all XML <SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">snippets. For details on how to migrate see <a href="https://blogs.msdn.com/akashmaheshwari/articles/474262.aspx">Akash's blog</A>.</SPAN></P>
<P><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"></SPAN>&nbsp;</P>
<P><SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">If you are just stuck on settings file you can use following settings file.</SPAN></P><PRE><P>&lt;?xml version="1.0" encoding="utf-8" ?&gt; <BR>&nbsp;&lt;SourceControlConverter&gt;<BR>&nbsp;&lt;ConverterSpecificSetting&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Source name="VSS"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;VSSDatabase name="e:\myrepository"&gt;&lt;/VSSDatabase&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; UserMap name="e:\Migrate\Usermap.xml" /&gt;</P>
<P><FONT color=#000000><BR></FONT><FONT color=#000000>&lt;!-- uncomment it if you want to specify a SQL server by default we use SQL express installed on you system --&gt;<BR>&lt;!--&nbsp;&nbsp;&nbsp; &lt;SQL Server="my sql server" /&gt; --&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Source&gt;</FONT></P>
<P><BR>&nbsp;&lt;ProjectMap&gt;<BR>&nbsp;&nbsp;&lt;Project Source="$/my folder1" Destination="$/my Team Project/my folder1"&gt;&lt;/Project&gt;&nbsp;<BR>&lt;Project Source="$/my folder2" Destination="$/my Team Project/my folder2"&gt;&lt;/Project&gt;<BR>&lt;!--&nbsp;u can add more mappings depending on&nbsp;number of folders you want to migrate --&gt;<BR>&nbsp;&lt;/ProjectMap&gt;</P>
<P>&nbsp; &lt;/ConverterSpecificSetting&gt;</P>
<P>&nbsp;&lt;Settings&gt;<BR>&nbsp;&nbsp; &lt;TeamFoundationServer name="My TFS name" port="8080" protocol="http"&gt;&lt;/TeamFoundationServer&gt;<BR>&lt;!-- assuming your server is set&nbsp;for http protocol&nbsp;and port is 8080 change this according to your install --&gt;</P><P>&lt;!-- you can specify the name of output report file here. it should be an xml--&gt;</P><P>&lt;Output file="VSSMigrationReport.xml" /&gt;<BR>&nbsp; &lt;/Settings&gt;<BR>&lt;/SourceControlConverter&gt;</P></PRE>]]></content:encoded>
    </item>
    <item>
      <title>How to stop threads on threadpool when my windows service is being stopped?</title>
      <link>https://docs.microsoft.com/archive/blogs/ankur/how-to-stop-threads-on-threadpool-when-my-windows-service-is-being-stopped</link>
      <pubDate>Fri, 16 Sep 2005 12:42:00 GMT</pubDate>
      <dc:creator><![CDATA[MSDN Archive]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ankur/2005/09/16/how-to-stop-threads-on-threadpool-when-my-windows-service-is-being-stopped/</guid>
      <description><![CDATA[I came accross a mail thread which deals with the problem i was facing some time back. Sharing it...]]></description>
      <content:encoded><![CDATA[<FONT color=#000080 size=2>
<P><FONT color=#000000>I came accross a mail thread which deals with the problem i was facing some time back. Sharing it to you all.</FONT></P>
<P><FONT color=#000000 size=3><STRONG>Problem:</STRONG></FONT></P>
<P><FONT color=#000000><EM>I have written a windows service in .Net that uses the ThreadPool.QueueUserWorkItem() call to do some processing. Each work item to the thread pool takes the same type of object to process (although with different arguments). At any given time, there will be a max of 8 items that I would have added to the thread pool. Each thread would take approx &lt; 1 min to finish the processing. </EM></FONT></P>
<P><FONT color=#000000><EM>Is there any way for the Service.OnStop() method to know which threads in the threadpool are running processes started by the main thread and is there any way to graciously stop those threads so that the system remains in a clean state when the service is stopped?</EM></FONT></P>
<P><FONT color=#000000 size=3><STRONG>Solution: </STRONG></FONT></P>
<P><STRONG><FONT color=#000000 size=3>1. </FONT></STRONG></P>
<P><FONT color=#000000><EM>I’m not sure if this is the correct way, but the way I do it is the following:</EM></FONT></P>
<P><FONT color=#000000><EM>Create a bool that your worker threads check to determine whether they should return immediately (e.g. public bool Shutdown_Now = false). Then in your OnStop() do: Shutdown_Now=true; Now you might want to assume that your threads have quit, but in the event that they haven’t, your service will fail to stop (which is probably a bug). Generally to prevent this from ever occurring, I’ll store a reference to Thread.CurrentThread whenever a worker thread starts. Then when OnStop() is called, I’ll notify them to quit with the Shutdown_Now bool and wait to see if the threads are still running after N seconds. If they are, then I’ll call thread.Abort().</EM></FONT></P>
<P><FONT color=#000000><EM>So long as you keep track of all the worker threads being used and make sure you dereference the threads that have completed, you shouldn’t have a problem</EM></FONT></P>
<P><STRONG><FONT color=#000000 size=3>2.</FONT></STRONG></P><FONT color=#0000ff size=2>
<P><FONT color=#000000><EM>What I have done and don't know if this is the best way is to create a ManualResetEvent and pass it to my worker threads. My worker threads will keep checking this and if it gets signaled they will shutdown. My OnStop() method simply signals the ManualResetEvent. I also create ManualResetEvents that my worker threads signal when they finish and I can also listen for those after I ask them to shutdown.</EM></FONT></P>
<P><STRONG><FONT color=#000000 size=3>3.</FONT></STRONG></P><FONT color=#000000 size=3>
<P><EM><FONT size=2>We had a similar problem. Have some global object that all threads can access. In your OnStop set that signal variable so that all threads would know that on stop is signaled. You will have to implement a logic in each thread function to check the stop signal variable and wind up processing immediately. Also once you set the variable in OnStop, put a sleep for 10-15 seconds (based on how much is your winding logic for each thread). </FONT></EM></P>
<P><EM></EM>&nbsp;</P>
<P><FONT color=#000000 size=2>All these solution are pretty similar in the sense the onus (and logic) was on the worker thread to keep checking at regular interval if it has to stop processing. which i don't like doing. this makes me wish there was a way i could signal to a worker thread to exit as fast as it can but this is not supported as of now :(.</FONT></P></FONT></FONT></FONT>]]></content:encoded>
    </item>
  </channel>
</rss>