Threading are self-abortingm why and how
I use a simple thread t = new thread() and start it with t.start(function);
It rans nice for about 20-25 minutes and are then aborting.. why? I have no error codes and can't write any output in catch..
May it be a problem that the t.start(function) calls a interface with functionname.Save() ?
The thread is called by click a button on a web page. When I try this on my asp.net developer webserver it rans fine,
jPosted Dec 6, 2009, 7:39 AM
Piotr JustynaPosted Dec 2, 2009, 9:38 AM
Please mark my answer as helpful if you like it :)
jPosted Dec 2, 2009, 9:22 AM
Piotr JustynaPosted Dec 2, 2009, 9:15 AM
I guess this should be placed in a separate post to make finding it easier for other users.
But what do you mean by 'split it on different resources'. Is your intention to create few separate threads to handle your method?
Please keep me informed! :)
jPosted Dec 2, 2009, 8:29 AM
The second part, the really particular one, which may be another question (tell me if so). How do I split this up on several resources that may speed up the processing?
It's appearently that buyable resources do the exactly same processing within 20 minutes, that takes me 4 hours. Except better coding and hardware, is there something behind threading/processes that can make this sort of work speeds up so much?
Piotr JustynaPosted Dec 2, 2009, 8:08 AM
I'm glad that my advice helped. You got it right - a thread should run until it has something to do. It's good, that you managed to log all exceptions to the database, but remember to also review them to find out what was the reason of previous errors! :)
If you like my answer please mark it as helpful.
jPosted Dec 2, 2009, 2:32 AM
Piotr JustynaPosted Dec 1, 2009, 8:40 AM
Please try to surround your method, which the thread is using with try-catch block and log exceptions in the catch block (to a file of Event Log). I'm sure there's something wrong with the method and there's just no possibility of getting the exception without try-catch block.
Cheers!