<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: C# .NET &#8211; UI Threading Example</title>
	<atom:link href="http://dougzuck.com/c-ui-threading-example/feed" rel="self" type="application/rss+xml" />
	<link>http://dougzuck.com/c-ui-threading-example</link>
	<description>A place to put some stuff...</description>
	<lastBuildDate>Thu, 09 Sep 2010 08:27:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
	<item>
		<title>By: francisco</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-15415</link>
		<dc:creator>francisco</dc:creator>
		<pubDate>Wed, 01 Sep 2010 20:10:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-15415</guid>
		<description>i was stuck with my degree project because of the &quot;only UI thread can modify UI elements&quot; problem. thanks!! :)</description>
		<content:encoded><![CDATA[<p>i was stuck with my degree project because of the &#8220;only UI thread can modify UI elements&#8221; problem. thanks!! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doug</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-11199</link>
		<dc:creator>doug</dc:creator>
		<pubDate>Tue, 27 Jul 2010 01:16:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-11199</guid>
		<description>Glad to hear it, Jim!  Thanks.</description>
		<content:encoded><![CDATA[<p>Glad to hear it, Jim!  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-11186</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Mon, 26 Jul 2010 23:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-11186</guid>
		<description>Hi Doug,

Just a quick Thanks!! for posting your article. After digging through the C# 4.0 Nutshell book and numerous examples on the &#039;net, yours is the first example that is straightforward, understandable, and actually worked when I used it as an example in my thread-to-UI update code.  Jim</description>
		<content:encoded><![CDATA[<p>Hi Doug,</p>
<p>Just a quick Thanks!! for posting your article. After digging through the C# 4.0 Nutshell book and numerous examples on the &#8216;net, yours is the first example that is straightforward, understandable, and actually worked when I used it as an example in my thread-to-UI update code.  Jim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-1993</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Mon, 18 Jan 2010 13:53:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-1993</guid>
		<description>Hi, I like the simplicity of your example. However, I wonder how the following situation should be resolved:

If you start the &quot;worker in a new thread&quot; and close the form BEFORE it has completed, the application crashes. 

Any idea on how to deal with this situation?</description>
		<content:encoded><![CDATA[<p>Hi, I like the simplicity of your example. However, I wonder how the following situation should be resolved:</p>
<p>If you start the &#8220;worker in a new thread&#8221; and close the form BEFORE it has completed, the application crashes. </p>
<p>Any idea on how to deal with this situation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-1237</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Mon, 23 Nov 2009 19:04:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-1237</guid>
		<description>i think the lock{} is only needed for shared variables. i.e. if you have more than one thread writing to that textbox. if there&#039;s another thread writing to that same text box you want to make sure it waits until the first thread finishes. to keep concurrency.</description>
		<content:encoded><![CDATA[<p>i think the lock{} is only needed for shared variables. i.e. if you have more than one thread writing to that textbox. if there&#8217;s another thread writing to that same text box you want to make sure it waits until the first thread finishes. to keep concurrency.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: doug</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-1139</link>
		<dc:creator>doug</dc:creator>
		<pubDate>Sun, 15 Nov 2009 22:13:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-1139</guid>
		<description>Raj - thanks for the comment.  I am definitely NOT an expert, but I don&#039;t see why we need a lock here.  Using a lock might be a technically safer thing to do on paper, but in reality I&#039;m not sure that it makes any difference.  It&#039;s certainly the case that my code above with no lock will never generate an exception, but it might be true that if you apply the above principles to larger projects a lock might become necessary.  Once again though, I don&#039;t claim to be an expert.  I&#039;ve only posted this because I think it&#039;s it&#039;s the easiest way to illustrate a simple UI that utilizes multiple threads.  

I&#039;d love for you to explain why we need a lock here.  I&#039;m always open to learn new things.  

-Doug</description>
		<content:encoded><![CDATA[<p>Raj &#8211; thanks for the comment.  I am definitely NOT an expert, but I don&#8217;t see why we need a lock here.  Using a lock might be a technically safer thing to do on paper, but in reality I&#8217;m not sure that it makes any difference.  It&#8217;s certainly the case that my code above with no lock will never generate an exception, but it might be true that if you apply the above principles to larger projects a lock might become necessary.  Once again though, I don&#8217;t claim to be an expert.  I&#8217;ve only posted this because I think it&#8217;s it&#8217;s the easiest way to illustrate a simple UI that utilizes multiple threads.  </p>
<p>I&#8217;d love for you to explain why we need a lock here.  I&#8217;m always open to learn new things.  </p>
<p>-Doug</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raj</title>
		<link>http://dougzuck.com/c-ui-threading-example/comment-page-1#comment-1116</link>
		<dc:creator>Raj</dc:creator>
		<pubDate>Sun, 15 Nov 2009 01:58:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dougzuck.com/?p=396#comment-1116</guid>
		<description>Dont we need to put the method populateTextBox inside a lock ?

      void populateTextBox(string text)
       {
          lock(this)
            {
                  textBox1.Text = textBox1.Text + &quot; &quot; + text;
             }
       }</description>
		<content:encoded><![CDATA[<p>Dont we need to put the method populateTextBox inside a lock ?</p>
<p>      void populateTextBox(string text)<br />
       {<br />
          lock(this)<br />
            {<br />
                  textBox1.Text = textBox1.Text + &#8221; &#8221; + text;<br />
             }<br />
       }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
