<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.developerdotstar.com/community" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>developer.* Blogs - .NET BackgroundWorker Mysteries Solved - Comments</title>
 <link>http://www.developerdotstar.com/community/node/671</link>
 <description>Comments for &quot;.NET BackgroundWorker Mysteries Solved&quot;</description>
 <language>en</language>
<item>
 <title>Backgroundworker returned result</title>
 <link>http://www.developerdotstar.com/community/node/671#comment-3403</link>
 <description>&lt;p&gt;I am trying to return as a result an array of bytes,&lt;br /&gt;
I am always getting an exception thread about overflow if I try to return saying more than 510 bytes. Is there a maximum allowable number for the&lt;br /&gt;
e.result object?&lt;/p&gt;
&lt;p&gt;/Kostas&lt;/p&gt;
</description>
 <pubDate>Fri, 12 Jan 2007 04:06:04 -0800</pubDate>
 <dc:creator>Kostas</dc:creator>
 <guid isPermaLink="false">comment 3403 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Thanks for this post ! I was</title>
 <link>http://www.developerdotstar.com/community/node/671#comment-3108</link>
 <description>&lt;p&gt;Thanks for this post ! I was stuck with this &quot;error-handling&quot; issue.&lt;/p&gt;
</description>
 <pubDate>Sat, 30 Dec 2006 07:01:27 -0800</pubDate>
 <dc:creator>FAS</dc:creator>
 <guid isPermaLink="false">comment 3108 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>One solution is to use a</title>
 <link>http://www.developerdotstar.com/community/node/671#comment-2503</link>
 <description>&lt;p&gt;One solution is to use a class to return your result instead of using simple types&lt;/p&gt;
</description>
 <pubDate>Thu, 21 Dec 2006 13:35:40 -0800</pubDate>
 <dc:creator>bill xie</dc:creator>
 <guid isPermaLink="false">comment 2503 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>Good points: Now try this one on for size</title>
 <link>http://www.developerdotstar.com/community/node/671#comment-2446</link>
 <description>&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;These are all good points, and I came across most of them myself in the last few days. So far so good, but now I&#039;m really stuck. I&#039;ve implemented M-V-P and got the Backgroundworker passed down to the Presenter (also tried creating it there instead), and the background code fetches user history from the DB async. Fantastic! Now I&#039;m trying to unit test this logic to get the code coverage up. Something I&#039;ve found particularly frustrating is that the TestMethod (NUnit) makes the call to getUserHistory() in the presenter which hits the DoWork delegate just fine on another thread, but then the RunWorkerComplete event never fires, even though I&#039;ve subscribed to it from the TestMethod and put a while loop holding the main thread alive for 30 seconds. Do you know how I can unit test this BackgroundWorker, or am I going to have to manage my own thread pool like I&#039;ve always done?&lt;/p&gt;
&lt;p&gt;Any help appreciated....&lt;br /&gt;
Thanks,&lt;br /&gt;
Rob&lt;/p&gt;
</description>
 <pubDate>Tue, 19 Dec 2006 05:38:19 -0800</pubDate>
 <dc:creator>Guest</dc:creator>
 <guid isPermaLink="false">comment 2446 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>background woker thread issue</title>
 <link>http://www.developerdotstar.com/community/node/671#comment-2204</link>
 <description>&lt;p&gt;Not being able to use try{}catch is really frustrating, I have a BackgroundWorker thread processing a list of jobs, jobs may throw exceptions, but I need to continue on to the next job, how do I achieve this now, I have to create another background worker or restart from the correct place everytime there is an exception?&lt;/p&gt;
</description>
 <pubDate>Wed, 13 Dec 2006 04:23:17 -0800</pubDate>
 <dc:creator>deloford</dc:creator>
 <guid isPermaLink="false">comment 2204 at http://www.developerdotstar.com/community</guid>
</item>
<item>
 <title>.NET BackgroundWorker Mysteries Solved</title>
 <link>http://www.developerdotstar.com/community/node/671</link>
 <description>&lt;p&gt;I&#039;ve found the BackgroundWorker to be very handy, but a little tricky to start using at first. I like that it has built-in support for reporting incremental progress for a long-running operation, and that it has a simple way of allowing a long-running operation to be canceled. And the big benefit, of course, is that your form remains responsive to the user and the operating system as it runs on the main UI thread. But there are some subtleties I had to overcome that are not covered in the documentation, especially in the area of exception handling.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.developerdotstar.com/community/node/671&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.developerdotstar.com/community/node/671#comment</comments>
 <category domain="http://www.developerdotstar.com/community/taxonomy/term/16">.NET</category>
 <pubDate>Mon, 04 Dec 2006 09:48:29 -0800</pubDate>
 <dc:creator>Daniel Read</dc:creator>
 <guid isPermaLink="false">671 at http://www.developerdotstar.com/community</guid>
</item>
</channel>
</rss>
