[RESOLVED] [2005] Threading in asp.net
I've never really done much threading in asp.net or otherwise and so have a few questions...
I have a long process that needs to fire after a user enters some info. The page should then tell them that their data is being analysed and they and their collegues will be informed by email when the results are complete.
So if i start this long process (max 10 mins) in a seperate thread is there any user action the user can do to stop the thread completing?
What happens to threads after they have completed (in term of system resources etc)?
Cheers.
Re: [2005] Threading in asp.net
1) No
2) A thread is returned back to the thread pool when it has completed its task.
Re: [2005] Threading in asp.net
For #1, it depends. If you have a loop in your thread which runs many times, you could perform a check for a session variable at the start of each loop, and if it has a value of say "false" or "stop", then you exit the method.
#2, what he said.
Re: [2005] Threading in asp.net
Quote:
Originally Posted by mendhak
For #1, it depends. If you have a loop in your thread which runs many times, you could perform a check for a session variable at the start of each loop, and if it has a value of say "false" or "stop", then you exit the method.
That's ok I don't want to stop the thread just wanted to make sure that the user couldn't screw it up in anyway (apart from physically attacking the server etc).
Re: [RESOLVED] [2005] Threading in asp.net