<?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: Use ThreadPool.QueueUserWorkItem With Anonymous Types</title>
	<atom:link href="http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/feed/" rel="self" type="application/rss+xml" />
	<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 28 Apr 2010 12:28:38 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dodgyrabbit</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-15975</link>
		<dc:creator>Dodgyrabbit</dc:creator>
		<pubDate>Mon, 22 Mar 2010 20:49:28 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-15975</guid>
		<description>By utilizing closures with anonymous methods, you can simplify this more.

For example:

string input1 = &quot;Input data 1&quot;; 
string input2 = &quot;Input data 2&quot;; 
ThreadPool.QueueUserWorkItem(delegate
        {
                // Safe to use enclosing variables here using closures
                Debug.WriteLine(input1);
                Debug.WriteLine(input2);
        }


Here is a similar question:
http://stackoverflow.com/questions/738139/threadpool-queueuserworkitem-with-a-lambda-expression-and-anonymous-method</description>
		<content:encoded><![CDATA[<p>By utilizing closures with anonymous methods, you can simplify this more.</p>
<p>For example:</p>
<p>string input1 = &#8220;Input data 1&#8243;;<br />
string input2 = &#8220;Input data 2&#8243;;<br />
ThreadPool.QueueUserWorkItem(delegate<br />
        {<br />
                // Safe to use enclosing variables here using closures<br />
                Debug.WriteLine(input1);<br />
                Debug.WriteLine(input2);<br />
        }</p>
<p>Here is a similar question:<br />
<a href="http://stackoverflow.com/questions/738139/threadpool-queueuserworkitem-with-a-lambda-expression-and-anonymous-method" rel="nofollow">http://stackoverflow.com/questions/738139/threadpool-queueuserworkitem-with-a-lambda-expression-and-anonymous-method</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-14192</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Mon, 04 Jan 2010 20:23:13 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-14192</guid>
		<description>What is the reference &quot;s&quot; in the following?
s =&gt; callback((T)s)

I&#039;m assuming it&#039;s a reference to an anonymous object, but I&#039;m not sure.</description>
		<content:encoded><![CDATA[<p>What is the reference &#8220;s&#8221; in the following?<br />
s =&gt; callback((T)s)</p>
<p>I&#8217;m assuming it&#8217;s a reference to an anonymous object, but I&#8217;m not sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vytheese</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-10248</link>
		<dc:creator>Vytheese</dc:creator>
		<pubDate>Mon, 20 Jul 2009 05:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-10248</guid>
		<description>This makes me clearer. Thanks a lot.</description>
		<content:encoded><![CDATA[<p>This makes me clearer. Thanks a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhu</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-9698</link>
		<dc:creator>Madhu</dc:creator>
		<pubDate>Fri, 05 Jun 2009 05:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-9698</guid>
		<description>Thanku very much. Post very useful. Was able to solve my problem of not being able to send multiple parameters using threads.</description>
		<content:encoded><![CDATA[<p>Thanku very much. Post very useful. Was able to solve my problem of not being able to send multiple parameters using threads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-9632</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 29 May 2009 04:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-9632</guid>
		<description>Hey everyone,
Sorry about the formatting mixup.  Some anonymous type annotations (&lt;T&gt;) had been eaten by the blog engine.  Hopefully this update fixes everything, though it&#039;s not as clean as I&#039;d like (trying VS2010 Beta + Live Writer on Win7 RC). Let me know if I missed something.</description>
		<content:encoded><![CDATA[<p>Hey everyone,<br />
Sorry about the formatting mixup.  Some anonymous type annotations (&lt;T&gt;) had been eaten by the blog engine.  Hopefully this update fixes everything, though it&#8217;s not as clean as I&#8217;d like (trying VS2010 Beta + Live Writer on Win7 RC). Let me know if I missed something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HowTo: Multithreading in .NET - Asynchrone Programmierung (Eventbasiert) &#124; Code-Inside Blog</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-8488</link>
		<dc:creator>HowTo: Multithreading in .NET - Asynchrone Programmierung (Eventbasiert) &#124; Code-Inside Blog</dc:creator>
		<pubDate>Sun, 12 Apr 2009 21:01:54 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-8488</guid>
		<description>[...] M&#246;glichkeiten aussuchen k&#246;nnen. Der Syntax sieht etwas kurios aus, weil ich eine annonyme Methode [...]</description>
		<content:encoded><![CDATA[<p>[...] M&#246;glichkeiten aussuchen k&#246;nnen. Der Syntax sieht etwas kurios aus, weil ich eine annonyme Methode [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: valerio.net &#187; Blog Archive &#187; Monitor a Process Asynchronously - More DelegateMarshaler Tricks</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-327</link>
		<dc:creator>valerio.net &#187; Blog Archive &#187; Monitor a Process Asynchronously - More DelegateMarshaler Tricks</dc:creator>
		<pubDate>Sat, 09 Aug 2008 22:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-327</guid>
		<description>[...] I click on the Run button, I want to execute some code on another thread from the ThreadPool (using ThreadPoolHelper), start the external process, attach a handler to the event that gets fired when a new line is [...]</description>
		<content:encoded><![CDATA[<p>[...] I click on the Run button, I want to execute some code on another thread from the ThreadPool (using ThreadPoolHelper), start the external process, attach a handler to the event that gets fired when a new line is [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ThreadPool.QueueUserWorkItem with Anonymous Types - Johan Danforth's Blog</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-107</link>
		<dc:creator>ThreadPool.QueueUserWorkItem with Anonymous Types - Johan Danforth's Blog</dc:creator>
		<pubDate>Thu, 03 Jul 2008 09:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-107</guid>
		<description>[...] thought this blog post by Matt Valerio was good, and it gave me a few ideas to use in a current test project. He wrote a helper method to [...]</description>
		<content:encoded><![CDATA[<p>[...] thought this blog post by Matt Valerio was good, and it gave me a few ideas to use in a current test project. He wrote a helper method to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-104</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Wed, 02 Jul 2008 16:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-104</guid>
		<description>By the way, as I&#039;ve been using this in my own code, I just found it easier to use the built-in Action&lt;T&gt; delegate instead of defining my own WaitCallback delegate that takes one argument of type T and returns void.</description>
		<content:encoded><![CDATA[<p>By the way, as I&#8217;ve been using this in my own code, I just found it easier to use the built-in Action&lt;T&gt; delegate instead of defining my own WaitCallback delegate that takes one argument of type T and returns void.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://thevalerios.net/matt/2008/05/use-threadpoolqueueuserworkitem-with-anonymous-types/comment-page-1/#comment-103</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Wed, 02 Jul 2008 15:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://thevalerios.net/matt/?p=14#comment-103</guid>
		<description>Ah, I&#039;d totally missed that typo.  Yes, HTML protection in effect. Thanks for the heads up!  Fixed :)</description>
		<content:encoded><![CDATA[<p>Ah, I&#8217;d totally missed that typo.  Yes, HTML protection in effect. Thanks for the heads up!  Fixed <img src='http://thevalerios.net/matt/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
