<?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: Asynchronous tasks on Winform</title>
	<atom:link href="http://www.manitra.net/blog/dev/asynchronous-tasks-on-winforms/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.manitra.net/blog/dev/asynchronous-tasks-on-winforms/</link>
	<description>Ideas on C# .NET</description>
	<lastBuildDate>Wed, 24 Feb 2010 08:08:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: manitra</title>
		<link>http://www.manitra.net/blog/dev/asynchronous-tasks-on-winforms/comment-page-1/#comment-6203</link>
		<dc:creator>manitra</dc:creator>
		<pubDate>Mon, 29 Jun 2009 16:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.manitra.net/blog/?p=32#comment-6203</guid>
		<description>Hi Mark,

This could be achieved with the following :
- create a static dictionary&lt;Control, AsyncCall&gt; containing all current calls 
- AsyncCall is a class containing :
     * the caller (a Control eg: the button)
     * the thread that executes the code

In the Async() method, add a new instance of call at the begining and remove it at the end.

If there is already a call with the same caller, kill its thread, remove it from the collection and do a normal call.

Was it clear enough ?</description>
		<content:encoded><![CDATA[<p>Hi Mark,</p>
<p>This could be achieved with the following :<br />
- create a static dictionary<control , AsyncCall> containing all current calls<br />
- AsyncCall is a class containing :<br />
     * the caller (a Control eg: the button)<br />
     * the thread that executes the code</p>
<p>In the Async() method, add a new instance of call at the begining and remove it at the end.</p>
<p>If there is already a call with the same caller, kill its thread, remove it from the collection and do a normal call.</p>
<p>Was it clear enough ?</control></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.manitra.net/blog/dev/asynchronous-tasks-on-winforms/comment-page-1/#comment-6202</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 29 Jun 2009 16:00:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.manitra.net/blog/?p=32#comment-6202</guid>
		<description>How could this be modified to allow the user to automatically cancel the previous async call and start a new async call (with new params) by clicking the button again?</description>
		<content:encoded><![CDATA[<p>How could this be modified to allow the user to automatically cancel the previous async call and start a new async call (with new params) by clicking the button again?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
