Thank you Andrew for your response. My answers below to some of your questions:
1) "What do you mean, can't stop them? How are you trying to stop them? " The program I've written is supposed to read an Excel file containing ID numbers (just text, not integers). I do this by performing it within a thread (using BackgroundWorker). And since reading the ID numbers would take some time, I provided a Stop button to allow the user to cancel what he is doing (through a call to CancelAsync()). 2) "Are you getting an exception, or a no op?" So far, there are no exceptions encountered. 3) "If you're using Abort -- DON'T! " Well, yes. I didn't use Abort(). I've read somewhere that using Abort () is tantamount to raising an exception. 4) "Have you looked into BackgroundWorkerThread?" Currently this is what I am using in my present project. Cheers! Benj On Oct 13, 3:36 pm, Andrew Badera <[email protected]> wrote: > Advice: don't use XP Home and Celeron machines in production! > > How can we possibly provide insight here without any real details? > What do you mean, can't stop them? How are you trying to stop them? > Are you getting an exception, or a no op? Are you logging/tracing > appropriately? If so, what is the log showing you? How about > memory/thread profiling? > > If you're using Abort -- DON'T! > > http://stackoverflow.com/questions/710070/timeout-pattern-how-bad-is-...http://www.bluebytesoftware.com/blog/2009/03/13/ManagedCodeAndAsynchr... > > Have you looked into BackgroundWorkerThread? You shouldn't be > stopping/halting/terminating/aborting threads. It's just not sound > software design. > > ∞ Andy Badera > ∞ +1 518-641-1280 > ∞ This email is: [ ] bloggable [x] ask first [ ] private > ∞ Google me:http://www.google.com/search?q=andrew%20badera > > On Tue, Oct 13, 2009 at 2:20 AM, Benj Nunez <[email protected]> wrote: > > > Hello everyone, > > > I recently wrote a program that allows users to interrupt a process > > which runs within a thread. > > I have code that looks like this: > > > private void btnStop_Click(object sender, EventArgs e) > > { > > bwOverAll.CancelAsync(); > > btnStop.Enabled = false; > > } > > > I'm not sure if threads rely somewhat on what CPU the PC has. I have > > tested my program to run > > on the following PCs and I can start/stop threads at will with no > > issues: > > > PC#1) Windows XP Home with SP3. Intel Pentium D 2.80Ghz, 504mb ram, > > Hyperthreading enabled. > > PC#2) Windows XP Pro with SP3, Intel Pentium 4, 2GB ram, > > Hyperthreading enabled. > > > On the production machine however, I checked its specifications to be > > like this: > > > PC#3) Windows XP Home, Intel Celeron. > > > All three PCs have .net framework 3.5 installed. > > > That's all I can remember. But I can check again about its ram and > > clock speed. > > Could you tell me exactly where to first look for in cases like this? > > Normally I expect that > > when I click the button to stop an action (threaded), there's a brief > > delay then the thread eventually stops. But in my case it didn't. > > > Any advice? > > > Benj
